mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@8673 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
26893ba2c2
commit
c07f3c3c58
7 changed files with 2 additions and 131 deletions
|
|
@ -2,7 +2,8 @@
|
|||
#define _AccessKey_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#include "Web/init"
|
||||
#define BLITZ_INDEX__ Fa0241d140f676330932ba69955e9bd41
|
||||
#include "SubTest/init"
|
||||
#define BLITZ_INDEX__ F190185a01d70a422cd7de990bd1c48a1
|
||||
#include "testing.icpp"
|
||||
#undef BLITZ_INDEX__
|
||||
#endif
|
||||
|
|
|
|||
0
uppdev/SubTest/SubTest.upp
Normal file
0
uppdev/SubTest/SubTest.upp
Normal file
0
uppdev/SubTest/SubTest2
Normal file
0
uppdev/SubTest/SubTest2
Normal file
0
uppdev/SubTest2/SubTest2.upp
Normal file
0
uppdev/SubTest2/SubTest2.upp
Normal file
|
|
@ -1,80 +0,0 @@
|
|||
//#include <CtrlLib/CtrlLib.h>
|
||||
#include "agg_upp_bind_test.h"
|
||||
|
||||
|
||||
|
||||
struct ClockTest : TopWindow {
|
||||
Option optR;
|
||||
|
||||
void PaintPtr(Draw& w, double pos, double m, int d, Color color, Size sz2)
|
||||
{
|
||||
w.DrawLine(sz2.cx, sz2.cy,
|
||||
sz2.cx + int(m * sin(pos * 2 * M_PI) * sz2.cx),
|
||||
sz2.cy - int(m * cos(pos * 2 * M_PI) * sz2.cy),
|
||||
d, color);
|
||||
}
|
||||
|
||||
void PaintCenteredText(Draw& w, int x, int y, const char *text, Font fnt, Color c)
|
||||
{
|
||||
Size tsz = GetTextSize(text, fnt);
|
||||
w.DrawText(x - tsz.cx / 2, y - tsz.cy / 2, text, fnt, c);
|
||||
}
|
||||
|
||||
virtual void Paint(Draw& w)
|
||||
{
|
||||
Size sz = GetSize();
|
||||
w.DrawRect(sz, SLtGray);
|
||||
sz -= 6;
|
||||
w.Offset(3, 3);
|
||||
Size sz2 = sz / 2;
|
||||
// w.DrawEllipse(0, 0, sz.cx, sz.cy, SWhite, 3, SBlack);
|
||||
|
||||
// Font fnt = Arial(min(sz.cx, sz.cy) / 10);
|
||||
// for(int i = 1; i <= 12; i++) {
|
||||
// int d = i % 3 == 0 ? 3 : 2;
|
||||
// PaintCenteredText(w, sz2.cx + int(0.8 * sin(i * M_PI / 6) * sz2.cx),
|
||||
// sz2.cy - int(0.8 * cos(i * M_PI / 6) * sz2.cy),
|
||||
// AsString(i), i % 3 ? fnt : fnt().Bold(), SBlack);
|
||||
// }
|
||||
Date date = GetSysDate();
|
||||
Time time = GetSysTime();
|
||||
// PaintCenteredText(w, sz.cx / 2, 3 * sz.cy / 5, GetLanguageInfo().FormatDate(date),
|
||||
// fnt().Bold(), SLtBlue);
|
||||
double tm = GetSysTime() - ToTime(date);
|
||||
// PaintPtr(w, tm / 60, 0.75, 1, SRed, sz2);
|
||||
// PaintPtr(w, tm / 3600, 0.6, 2, SCyan, sz2);
|
||||
// PaintPtr(w, tm / 3600 / 12, 0.5, 4, SBlack, sz2);
|
||||
AggDrawer agd(RectC(0,0,sz.cx, sz.cy));
|
||||
agd.SetBackground(agg::rgba(0, 1.0, 1.0, ~optR));
|
||||
// agd.SetBackground(agg::rgba(1.0, 0.5, 0.5));
|
||||
|
||||
agd.DrawLine(0,0,100,100,10);
|
||||
agd.SetBrushColor(agg::rgba(0, 0, 0));
|
||||
// agd.DrawLine(100,0,200,100,10);
|
||||
agd.DrawEllipse(sz2.cx, sz2.cy, sz2.cx-10, sz2.cy-10, 3);
|
||||
|
||||
agd.End(w, ~optR);
|
||||
w.End();
|
||||
}
|
||||
|
||||
void Timer()
|
||||
{
|
||||
Refresh();
|
||||
}
|
||||
|
||||
ClockTest()
|
||||
{
|
||||
optR.SetRect(0,0,50,50);
|
||||
Add(optR);
|
||||
SetRect(0, 0, 600, 300);
|
||||
Sizeable().Zoomable();
|
||||
BackPaint();
|
||||
SetTimeCallback(-1000, callback(this, &ClockTest::Timer));
|
||||
Title("ClockTest");
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
ClockTest().Run();
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
#ifndef _agg_upp_bind_test_agg_upp_bind_test_h_
|
||||
#define _agg_upp_bind_test_agg_upp_bind_test_h_
|
||||
|
||||
|
||||
//#include <CtrlLib/CtrlLib.h>
|
||||
//#define AGG_RGBA32
|
||||
//#include <agg_aris_main/agg_aris_main.h>
|
||||
|
||||
//#include <vector>
|
||||
//namespace agg
|
||||
//{
|
||||
// UPP::NTL_MOVEABLE(vertex_d);
|
||||
// typedef path_base<vertex_stl_storage<std::vector<vertex_f> > > stl_path_storage;
|
||||
// typedef path_base<vertex_upp_storage<Upp::Vector<vertex_d> > > upp_path_storage;
|
||||
|
||||
//}
|
||||
|
||||
//#define path_storage stl_path_storage
|
||||
//#define path_storage upp_path_storage
|
||||
|
||||
|
||||
|
||||
#include <agg_upp_bind/agg_upp_bind.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#if 0
|
||||
void TrianglePath(agg::path_storage& path, double *_m_x, double *_m_y)
|
||||
{
|
||||
//aris: test ...
|
||||
// agg::path_storage path;
|
||||
path.move_to(_m_x[0], _m_y[0]);
|
||||
path.line_to(_m_x[1], _m_y[1]);
|
||||
path.line_to(_m_x[2], _m_y[2]);
|
||||
path.close_polygon();
|
||||
// return path;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
uses
|
||||
agg_upp_bind;
|
||||
|
||||
file
|
||||
agg_upp_bind_test.h,
|
||||
agg_upp_bind_test.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue