mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
DrawBench cairo optimization
git-svn-id: svn://ultimatepp.org/upp/trunk@765 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e0966b540d
commit
888812b003
1 changed files with 83 additions and 81 deletions
|
|
@ -27,6 +27,9 @@ void AddRect(Cairo &c, double size)
|
||||||
c.Rotate(-M_PI/4.);
|
c.Rotate(-M_PI/4.);
|
||||||
AddRect(c, size / M_SQRT2);
|
AddRect(c, size / M_SQRT2);
|
||||||
c.Restore();
|
c.Restore();
|
||||||
|
|
||||||
|
c.Fill();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoRect(Painter &sw, double size)
|
void DoRect(Painter &sw, double size)
|
||||||
|
|
@ -76,7 +79,6 @@ void DrawPythagorasTree(Size sz, Painter *sw, Cairo *ca)
|
||||||
ca->MoveTo(sz.cx/2, size/2);
|
ca->MoveTo(sz.cx/2, size/2);
|
||||||
AddRect(*ca, size);
|
AddRect(*ca, size);
|
||||||
ca->SetSourceRGB(Black());
|
ca->SetSourceRGB(Black());
|
||||||
ca->Fill();
|
|
||||||
ca->Restore();
|
ca->Restore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue