developing new draw

git-svn-id: svn://ultimatepp.org/upp/trunk@1372 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-07-06 20:31:00 +00:00
parent aa30f86a8c
commit fa47b4615a
74 changed files with 3278 additions and 3431 deletions

View file

@ -1,4 +1,4 @@
#include "Draw.h"
#include "SystemDraw.h"
NAMESPACE_UPP
@ -6,7 +6,7 @@ NAMESPACE_UPP
void SystemDraw::DrawImageOp(int x, int y, int cx, int cy, const Image& img, const Rect& src, Color color)
{
DrawLock __;
GuiLock __;
LTIMING("DrawImageOp");
bool tonative = !IsNative();
if(tonative) {
@ -40,4 +40,14 @@ void SystemDraw::DrawImageOp(int x, int y, int cx, int cy, const Image& img, con
EndNative();
}
Draw& ImageDraw::Alpha()
{
if(!has_alpha) {
alpha.DrawRect(size, GrayColor(0));
has_alpha = true;
}
return alpha;
}
END_UPP_NAMESPACE