From 1f0ff9228f7260c083c4d6800a4e11d923cba1ff Mon Sep 17 00:00:00 2001 From: kohait Date: Tue, 28 Jun 2011 09:20:41 +0000 Subject: [PATCH] rainbow: some recent changes ported to WinAlt git-svn-id: svn://ultimatepp.org/upp/trunk@3574 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- rainbow/Framebuffer/Image.cpp | 2 +- rainbow/WinAlt/DrawOpWinAlt.cpp | 6 ++++++ rainbow/WinAlt/ImageWinAlt.cpp | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/rainbow/Framebuffer/Image.cpp b/rainbow/Framebuffer/Image.cpp index e95c069a3..3ad6ae7a3 100644 --- a/rainbow/Framebuffer/Image.cpp +++ b/rainbow/Framebuffer/Image.cpp @@ -2,7 +2,7 @@ #ifdef GUI_FB -#include +//#include NAMESPACE_UPP diff --git a/rainbow/WinAlt/DrawOpWinAlt.cpp b/rainbow/WinAlt/DrawOpWinAlt.cpp index 1f40c84ba..8c3bf8944 100644 --- a/rainbow/WinAlt/DrawOpWinAlt.cpp +++ b/rainbow/WinAlt/DrawOpWinAlt.cpp @@ -145,6 +145,12 @@ void SystemDraw::DrawLineOp(int x1, int y1, int x2, int y2, int width, Color col ::LineTo(handle, x2, y2); } +void SystemDraw::DrawImageOp(int x, int y, int cx, int cy, const Image& img, const Rect& src, Color color) +{ + GuiLock __; + StdDrawImage(*this, x, y, cx, cy, img, src, color); +} + #ifndef PLATFORM_WINCE void SystemDraw::DrawPolyPolylineOp(const Point *vertices, int vertex_count, diff --git a/rainbow/WinAlt/ImageWinAlt.cpp b/rainbow/WinAlt/ImageWinAlt.cpp index 329418d34..bdc591003 100644 --- a/rainbow/WinAlt/ImageWinAlt.cpp +++ b/rainbow/WinAlt/ImageWinAlt.cpp @@ -400,6 +400,15 @@ void ImageDraw::Init() has_alpha = false; } +Draw& ImageDraw::Alpha() +{ + if(!has_alpha) { + alpha.DrawRect(size, GrayColor(0)); + has_alpha = true; + } + return alpha; +} + Image ImageDraw::Get(bool pm) const { ImageBuffer b(size);