From 844e2956d20415f5cf407c00fdfd2ff41484776c Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 28 Nov 2012 20:37:36 +0000 Subject: [PATCH] CtrlCore: InstallPanicBox in win32 git-svn-id: svn://ultimatepp.org/upp/trunk@5590 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CtrlCore/CtrlCore.h | 2 -- uppsrc/CtrlCore/Win32Wnd.cpp | 5 +++++ uppsrc/Draw/src.tpp/Draw$en-us.tpp | 15 +++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/uppsrc/CtrlCore/CtrlCore.h b/uppsrc/CtrlCore/CtrlCore.h index 805abfb27..7cb2ee88d 100644 --- a/uppsrc/CtrlCore/CtrlCore.h +++ b/uppsrc/CtrlCore/CtrlCore.h @@ -48,8 +48,6 @@ Size GetScreenSize(); typedef ImageDraw SystemImageDraw; -void StdDrawImage(SystemDraw& w, int x, int y, int cx, int cy, const Image& img, const Rect& src, Color color); - void SetSurface(Draw& w, const Rect& dest, const RGBA *pixels, Size srcsz, Point poff); void SetSurface(Draw& w, int x, int y, int cx, int cy, const RGBA *pixels); diff --git a/uppsrc/CtrlCore/Win32Wnd.cpp b/uppsrc/CtrlCore/Win32Wnd.cpp index 042c99bf3..fdb1f0094 100644 --- a/uppsrc/CtrlCore/Win32Wnd.cpp +++ b/uppsrc/CtrlCore/Win32Wnd.cpp @@ -234,6 +234,11 @@ static void Win32PanicMessageBox(const char *title, const char *text) #endif } +void Ctrl::InstallPanicBox() +{ + InstallPanicMessageBox(&Win32PanicMessageBox); +} + void Ctrl::InitWin32(HINSTANCE hInstance) { GuiLock __; diff --git a/uppsrc/Draw/src.tpp/Draw$en-us.tpp b/uppsrc/Draw/src.tpp/Draw$en-us.tpp index b4915684a..515b526e2 100644 --- a/uppsrc/Draw/src.tpp/Draw$en-us.tpp +++ b/uppsrc/Draw/src.tpp/Draw$en-us.tpp @@ -154,6 +154,15 @@ screen output in Ctrl`::Paint, [%-*@3 color] can be assigned special value InvertColor() causing invertion of all pixels in target area.&] [s3;%% &] +[s4; &] +[s5;:Draw`:`:SysDrawImageOp`(int`,int`,const Image`&`,const Rect`&`,Color`): [@(0.0.255) v +irtual] [@(0.0.255) void]_[* SysDrawImageOp]([@(0.0.255) int]_[*@3 x], +[@(0.0.255) int]_[*@3 y], [@(0.0.255) const]_[_^Image^ Image][@(0.0.255) `&]_[*@3 img], +[@(0.0.255) const]_[_^Rect^ Rect][@(0.0.255) `&]_[*@3 src], [_^Color^ Color]_[*@3 color])&] +[s2;%% Low(er)`-level draw of Image, called by DrawImageOp. Draw +derived class can either override this method and depend on DrawImageOp +to do rescaling and printer banding or override DrawImageOp directly.&] +[s3;%% &] [s4;%% &] [s5;:Draw`:`:DrawImageOp`(int`,int`,int`,int`,const Image`&`,const Rect`&`,Color`): [@(0.0.255) v irtual] [@(0.0.255) void]_[* DrawImageOp]([@(0.0.255) int]_[*@3 x], [@(0.0.255) int]_[*@3 y], @@ -164,7 +173,9 @@ irtual] [@(0.0.255) void]_[* DrawImageOp]([@(0.0.255) int]_[*@3 x], [@(0.0.255) at [%-*@3 x], [%-*@3 y] rescaling it to [%-*@3 cx], [%-*@3 cy] (if they are equal to original Image size, no rescaling is performed). If [%-*@3 color] is not null, only alpha information of Image is -used and color pixels are painted using [%-*@3 color].&] +used and color pixels are painted using [%-*@3 color]. Default +implementation performs rescaling operation in software, including +banding support for printer, then calls SysDrawImageOp.&] [s3;%% &] [s4;%% &] [s5;:Draw`:`:DrawDataOp`(int`,int`,int`,int`,const String`&`,const char`*`): [@(0.0.255) v @@ -767,4 +778,4 @@ default charset is used. Implemented using DrawTextOp.&] [s2;%% This simple utility function computes sin(angle) and cos(angle), where the full angle (2[%- π) ]is 3600.&] [s3; &] -[s0; ] \ No newline at end of file +[s0; ]] \ No newline at end of file