mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.rainbow gtk InvertColor
git-svn-id: svn://ultimatepp.org/upp/trunk@5648 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4012a3faa3
commit
4acd97fe0d
2 changed files with 11 additions and 2 deletions
|
|
@ -105,9 +105,17 @@ void SystemDraw::DrawRectOp(int x, int y, int cx, int cy, Color color)
|
|||
{
|
||||
if(IsNull(color))
|
||||
return;
|
||||
SetColor(color);
|
||||
cairo_rectangle(cr, x, y, cx, cy);
|
||||
cairo_fill(cr);
|
||||
if(color == InvertColor()) {
|
||||
SetColor(White());
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
|
||||
cairo_fill(cr);
|
||||
cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
|
||||
}
|
||||
else {
|
||||
SetColor(color);
|
||||
cairo_fill(cr);
|
||||
}
|
||||
}
|
||||
|
||||
void SystemDraw::DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color)
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ struct MyApp : TopWindow {
|
|||
w.DrawText(100, y, log[i]);
|
||||
y += fcy;
|
||||
}
|
||||
w.DrawRect(0, 0, 50, fcy * 3, InvertColor());
|
||||
}
|
||||
|
||||
MyApp() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue