ultimatepp/examples/Color/main.cpp
cxl b87ec0e8ff Several examples fixed to compile and work in new draw
git-svn-id: svn://ultimatepp.org/upp/trunk@1386 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-07-08 18:44:19 +00:00

20 lines
355 B
C++

#include "Color.h"
ColorWindow::ColorWindow()
{
Sizeable().Zoomable();
}
void ColorWindow::Paint(Draw& draw)
{
draw.DrawRect(GetSize(), White());
for(int i = 0; i < 16; i++) {
Color c(i & 1 ? 255 : 0, i & 2 ? 255 : 0, i & 4 ? 255 : 0);
draw.DrawText(0, i * 30, AsString(c), Arial(30).Underline(), c);
}
}
GUI_APP_MAIN
{
ColorWindow().Run();
}