From 319f8d4fcd2e0072d4ffc4ede52bd7040f51edc9 Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 26 May 2017 17:02:55 +0000 Subject: [PATCH] Image::GetDPI now const (thanks SergeA) git-svn-id: svn://ultimatepp.org/upp/trunk@11124 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Draw/Image.cpp | 2 +- uppsrc/Draw/Image.h | 2 +- uppsrc/Draw/src.tpp/Image$en-us.tpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/uppsrc/Draw/Image.cpp b/uppsrc/Draw/Image.cpp index 42390253f..7ea1a9cf7 100644 --- a/uppsrc/Draw/Image.cpp +++ b/uppsrc/Draw/Image.cpp @@ -187,7 +187,7 @@ Size Image::GetDots() const return data ? data->buffer.GetDots() : Size(0, 0); } -Size Image::GetDPI() +Size Image::GetDPI() const { Size size = GetSize(); Size dots = GetDots(); diff --git a/uppsrc/Draw/Image.h b/uppsrc/Draw/Image.h index 063fb4ac0..a18f57edf 100644 --- a/uppsrc/Draw/Image.h +++ b/uppsrc/Draw/Image.h @@ -179,7 +179,7 @@ public: Point GetHotSpot() const; Point Get2ndSpot() const; Size GetDots() const; - Size GetDPI(); + Size GetDPI() const; int GetKindNoScan() const; int GetKind() const; int GetResolution() const; diff --git a/uppsrc/Draw/src.tpp/Image$en-us.tpp b/uppsrc/Draw/src.tpp/Image$en-us.tpp index 7dd439b66..cb355d213 100644 --- a/uppsrc/Draw/src.tpp/Image$en-us.tpp +++ b/uppsrc/Draw/src.tpp/Image$en-us.tpp @@ -68,7 +68,7 @@ dSpot()_[@(0.0.255) const]&] returns Size(0, 0).&] [s3; &] [s4; &] -[s5;:Image`:`:GetDPI`(`): [_^topic`:`/`/Core`/src`/Size`$en`-us^ Size]_GetDPI()&] +[s5;:Image`:`:GetDPI`(`): [_^Upp`:`:Size^ Size]_[* GetDPI]()_[@(0.0.255) const]&] [s2;%% Returns the image resolution in dpi (dots per inch).&] [s3; &] [s4; &]