ultimatepp/uppdev/Draw/BackDraw.cpp
cxl bc369fae03 Developing new Draw (in uppdev)
git-svn-id: svn://ultimatepp.org/upp/trunk@1128 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-05-07 16:38:32 +00:00

42 lines
663 B
C++

#include "Draw.h"
// ---------------------------
Draw& 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();
}
Draw& ScreenInfo();
bool ScreenInPaletteMode()
{
return ScreenInfo().PaletteMode();
}
Size GetScreenSize()
{
return ScreenInfo().GetPagePixels();
}