ultimatepp/uppdev/Draw/BackDraw.cpp
cxl d6c6118a16 Developing Draw
git-svn-id: svn://ultimatepp.org/upp/trunk@1146 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-05-07 21:52:17 +00:00

42 lines
650 B
C++

#include "Draw.h"
NAMESPACE_UPP
SystemDraw& ScreenInfo();
void BackDraw::Create(int cx, int cy)
{
DrawLock __;
Create(ScreenInfo(), cx, cy);
}
bool BackDraw::IsPaintingOp(const Rect& r) const
{
Rect rr = r + GetOffset();
if(!rr.Intersects(size))
return false;
return painting ? painting->IsPainting(rr + painting_offset) : true;
}
BackDraw::BackDraw()
{
painting = NULL;
painting_offset = Point(0, 0);
}
BackDraw::~BackDraw()
{
Destroy();
}
bool ScreenInPaletteMode()
{
return ScreenInfo().PaletteMode();
}
Size GetScreenSize()
{
return ScreenInfo().GetPagePixels();
}
END_UPP_NAMESPACE