From d47431eb8d2051cb6acfc7d94b9b45cfca59a4f7 Mon Sep 17 00:00:00 2001 From: koldo Date: Fri, 17 Sep 2010 21:13:42 +0000 Subject: [PATCH] Draw: Documented GetDPI() and SetDPI() git-svn-id: svn://ultimatepp.org/upp/trunk@2702 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Draw/src.tpp/Image$en-us.tpp | 4 ++++ uppsrc/Draw/src.tpp/ImageBuffer$en-us.tpp | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/uppsrc/Draw/src.tpp/Image$en-us.tpp b/uppsrc/Draw/src.tpp/Image$en-us.tpp index 4752931a4..585ad92d9 100644 --- a/uppsrc/Draw/src.tpp/Image$en-us.tpp +++ b/uppsrc/Draw/src.tpp/Image$en-us.tpp @@ -64,6 +64,10 @@ erator`[`]([@(0.0.255) int]_[@3 i])_[@(0.0.255) const]&] returns Size(0, 0).&] [s3; &] [s4; &] +[s5;:Image`:`:GetDPI`(`): [_^Size^ Size]_GetDPI()&] +[s2;%% Returns the image resolution in dpi (dots per inch).&] +[s3; &] +[s4; &] [s5;:Image`:`:GetKindNoScan`(`)const: [@(0.0.255) int]_GetKindNoScan()_[@(0.0.255) const]&] [s2;%% Returns the kind of image. Unlike GetKind(), it does not perform the scan of image if the kind it not know, therefore it can return diff --git a/uppsrc/Draw/src.tpp/ImageBuffer$en-us.tpp b/uppsrc/Draw/src.tpp/ImageBuffer$en-us.tpp index d62fad861..a1dfa2488 100644 --- a/uppsrc/Draw/src.tpp/ImageBuffer$en-us.tpp +++ b/uppsrc/Draw/src.tpp/ImageBuffer$en-us.tpp @@ -95,6 +95,18 @@ st]&] 0).&] [s3; &] [s4; &] +[s5;:ImageBuffer`:`:SetDPI`(Size`): [@(0.0.255) void]_[* SetDPI]([_^Size^ Size]_[*@3 sz])&] +[s2;%% Sets the image resolution in dpi (dots per inch).&] +[s2;%% As the dpi are not directly stored, if SetDots() is called +or image is resized, the dpi could change.&] +[s3;%% &] +[s4; &] +[s5;:ImageBuffer`:`:GetDPI`(`): [_^Size^ Size]_[* GetDPI]()&] +[s2;%% Returns the image resolution in dpi (dots per inch).&] +[s2;%% As the dpi are not directly stored, if SetDots() is called +or image is resized, the dpi could change.&] +[s3; &] +[s4; &] [s5;:ImageBuffer`:`:GetSize`(`)const: [*_^Size^ Size][* _GetSize()_][*@(0.0.255) const]&] [s2;%% Returns the dimensions of image.&] [s3; &]