Draw: SDraw improvements

git-svn-id: svn://ultimatepp.org/upp/trunk@6349 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2013-09-15 17:50:42 +00:00
parent 0e3832a5a2
commit f28ff72d5f
2 changed files with 4 additions and 2 deletions

View file

@ -4,10 +4,10 @@ NAMESPACE_UPP
void SDraw::Init(const Rect& r)
{
Cy(r.GetWidth());
Cy(r.GetHeight());
Cloff& c = cloff.Add();
c.clip.Add(r);
c.offset = Point(0, 0);
c.offset = r.TopLeft();
}
void SDraw::BeginOp()

View file

@ -50,6 +50,8 @@ void SDraw::SysDrawImageOp(int x, int y, const Image& img, Color color)
void SDraw::DrawRectOp(int x, int y, int cx, int cy, Color color)
{
if(IsNull(color))
return;
Rect r = RectC(x, y, cx, cy);
r += cloff.Top().offset;
const Vector<Rect>& clip = cloff.Top().clip;