mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-09 03:24:59 -06:00
.developing rainbow
git-svn-id: svn://ultimatepp.org/upp/trunk@3572 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bacadf9c6f
commit
76e0cda649
8 changed files with 111 additions and 143 deletions
|
|
@ -7,6 +7,69 @@ NAMESPACE_UPP
|
|||
#define LLOG(x) // LOG(x)
|
||||
#define LTIMING(x) // RTIMING(x)
|
||||
|
||||
void SystemDraw::Push()
|
||||
{
|
||||
Point p = GetOffset();
|
||||
offset.Add(p);
|
||||
BufferPainter::BeginOp();
|
||||
}
|
||||
|
||||
void SystemDraw::Pop()
|
||||
{
|
||||
if(offset.GetCount())
|
||||
offset.Drop();
|
||||
BufferPainter::EndOp();
|
||||
}
|
||||
|
||||
Point SystemDraw::GetOffset() const
|
||||
{
|
||||
return offset.GetCount() ? offset.Top() : Point(0, 0);
|
||||
}
|
||||
|
||||
void SystemDraw::BeginOp()
|
||||
{
|
||||
Push();
|
||||
}
|
||||
|
||||
void SystemDraw::EndOp()
|
||||
{
|
||||
Pop();
|
||||
}
|
||||
|
||||
void SystemDraw::OffsetOp(Point p)
|
||||
{
|
||||
Push();
|
||||
offset.Top() += p;
|
||||
Translate(p.x, p.y);
|
||||
}
|
||||
|
||||
bool SystemDraw::ClipOp(const Rect& r)
|
||||
{
|
||||
Push();
|
||||
RectPath(r);
|
||||
Painter::Clip();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SystemDraw::ClipoffOp(const Rect& r)
|
||||
{
|
||||
Push();
|
||||
offset.Top() += r.TopLeft();
|
||||
RectPath(r);
|
||||
Painter::Clip();
|
||||
Translate(r.left, r.top);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SystemDraw::IsPaintingOp(const Rect& r) const
|
||||
{
|
||||
Rect rr = r + GetOffset();
|
||||
for(int i = 0; i < invalid.GetCount(); i++)
|
||||
if(invalid[i].Intersects(rr))
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*Rect SystemDraw::GetVirtualScreenArea()
|
||||
{
|
||||
GuiLock __;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue