From 8d1b7cbd1688d7637fa3754ef95dcee503d506a6 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 22 Apr 2020 07:00:34 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@14347 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- upptst/InvertColor/InvertColor.upp | 9 +++++++++ upptst/InvertColor/main.cpp | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 upptst/InvertColor/InvertColor.upp create mode 100644 upptst/InvertColor/main.cpp diff --git a/upptst/InvertColor/InvertColor.upp b/upptst/InvertColor/InvertColor.upp new file mode 100644 index 000000000..5872304d3 --- /dev/null +++ b/upptst/InvertColor/InvertColor.upp @@ -0,0 +1,9 @@ +uses + CtrlLib; + +file + main.cpp; + +mainconfig + "" = "GUI"; + diff --git a/upptst/InvertColor/main.cpp b/upptst/InvertColor/main.cpp new file mode 100644 index 000000000..bcdbb1ee2 --- /dev/null +++ b/upptst/InvertColor/main.cpp @@ -0,0 +1,23 @@ +#include + +using namespace Upp; + +struct MyApp : TopWindow { + virtual void Paint(Draw& w) { + w.DrawRect(GetSize(), White()); + + for(Color c : { Black(), Blue(), Red(), Yellow() }) { + w.DrawRect(10, 10, 200, 100, c); + w.DrawRect(30, 30, 50, 50, InvertColor()); + + w.DrawRect(130, 30, 50, 50, InvertColor()); + w.DrawRect(150, 30, 50, 50, InvertColor()); + w.Offset(0, 120); + } + } +}; + +GUI_APP_MAIN +{ + MyApp().Run(); +}