Developing Draw

git-svn-id: svn://ultimatepp.org/upp/trunk@1146 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-05-07 21:52:17 +00:00
parent 39f7e7385c
commit 6674597efe
15 changed files with 90 additions and 48 deletions

View file

@ -31,7 +31,7 @@ void Draw::SinCos(int angle, double& sina, double& cosa)
Size Draw::GetPixelsPerInch() const
{
return IsDots() ? Size(600, 600) : Size(96, 96);
return Dots() ? Size(600, 600) : Size(96, 96);
}
int Draw::GetNativeX(int x) const
@ -398,6 +398,23 @@ void Draw::DrawPainting(int x, int y, int cx, int cy, const Painting& ig)
DrawPainting(RectC(x, y, cx, cy), ig);
}
HDC Draw::BeginGdi()
{
SystemDraw *w = dynamic_cast<SystemDraw *>(this);
return w ? w->BeginGdi() : NULL;
}
void Draw::EndGdi()
{
SystemDraw *w = dynamic_cast<SystemDraw *>(this);
if(w) w->EndGdi();
}
void Draw::Flush()
{
SystemDraw::Flush();
}
// ---------------------------
dword NilDraw::GetInfo() const { return DOTS; }