diff --git a/uppdev/AccessKey/AccessKey.lay b/uppdev/AccessKey/AccessKey.lay index 5f2fb619b..b1e949ba5 100644 --- a/uppdev/AccessKey/AccessKey.lay +++ b/uppdev/AccessKey/AccessKey.lay @@ -1,7 +1,7 @@ LAYOUT(AccessKeyLayout, 200, 100) ITEM(Base, ok, RightPosZ(90, 80).BottomPosZ(4, 22)) ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(4, 80).BottomPosZ(4, 22)) - ITEM(Label, dv___2, SetLabel(t_("asdfasdf\aTest\\a\\n\\b\001asdfasdf")).SetFont(SansSerifZ(20)).LeftPosZ(0, 136).TopPosZ(32, 32)) + ITEM(Label, dv___2, SetLabel(t_("asdfasdf\a\001[= Test")).SetFont(SansSerifZ(20)).LeftPosZ(8, 188).TopPosZ(28, 32)) ITEM(EditDate, dv___3, LeftPosZ(56, 140).TopPosZ(4, 19)) END_LAYOUT diff --git a/uppdev/Glyph/Glyph.upp b/uppdev/Glyph/Glyph.upp index 435eced4e..11b477f4f 100644 --- a/uppdev/Glyph/Glyph.upp +++ b/uppdev/Glyph/Glyph.upp @@ -1,3 +1,5 @@ +description "(SDraw test)\377"; + uses CtrlLib, Painter; diff --git a/uppdev/Glyph/main.cpp b/uppdev/Glyph/main.cpp index c7d05a5fe..a2c894b82 100644 --- a/uppdev/Glyph/main.cpp +++ b/uppdev/Glyph/main.cpp @@ -43,6 +43,47 @@ void MyApp::MouseWheel(Point p, int zdelta, dword keyflags) Refresh(); } +void PolyPolyPolygon(Draw& sw) +{ + Point points[12][2][4]; + int subpolygon_counts[12][2]; + int disjunct_counts[12]; + Point lpoints[12][5]; + int lcounts[12][2]; + Pointf center(400, 300); + static const double out_delta = 2 * M_PI / 24; + static const double in_delta = 2 * M_PI / 48; + for(int i = 0; i < 12; i++) { + double angle = i * 2 * M_PI / 12; + points[i][0][0] = Polar(center, 200, angle); + points[i][0][1] = Polar(center, 120, angle - out_delta); + points[i][0][2] = Polar(center, 40, angle); + points[i][0][3] = Polar(center, 120, angle + out_delta); + points[i][1][0] = Polar(center, 160, angle); + points[i][1][1] = Polar(center, 120, angle + in_delta); + points[i][1][2] = Polar(center, 80, angle); + points[i][1][3] = Polar(center, 120, angle - in_delta); + subpolygon_counts[i][0] = 4; + subpolygon_counts[i][1] = 4; + disjunct_counts[i] = subpolygon_counts[i][0] + subpolygon_counts[i][1]; + + lpoints[i][0] = Polar(center, 260, angle + in_delta); + lpoints[i][1] = Polar(center, 230, angle); + lpoints[i][2] = Polar(center, 260, angle - in_delta); + lcounts[i][0] = 3; + lpoints[i][3] = Polar(center, 280, angle + in_delta); + lpoints[i][4] = Polar(center, 280, angle - in_delta); + lcounts[i][1] = 2; + } + sw.DrawPolyPolyPolygon(points[0][0], sizeof(points) / sizeof(Point), + subpolygon_counts[0], sizeof(subpolygon_counts) / sizeof(int), + disjunct_counts, sizeof(disjunct_counts) / sizeof(int), + LtBlue(), 4, LtRed(), I64(0xF0F0F0F00F0F0F0F)); + sw.DrawPolyPolyline(lpoints[0], sizeof(lpoints) / sizeof(Point), + lcounts[0], sizeof(lcounts) / sizeof(int), + 4, Color(0, 192, 0)); +} + void MyApp::Paint(Draw& w) { Size sz = GetSize(); @@ -71,17 +112,18 @@ void MyApp::Paint(Draw& w) // fw.DrawText(100, 100, "Ahoj!", Roman(400)); - + PolyPolyPolygon(fw); + RichText txt = ParseQTF(LoadFile(GetDataFile("text.qtf"))); - if(1) { + if(0) { RTIMING("SDraw"); txt.Paint(Zoom(2, 10), fw, 0, 0, sz.cx); } - if(1) { + if(0) { RTIMING("Draw"); txt.Paint(Zoom(2, 10), w, 0, 0, sz.cx); } - if(1) { + if(0) { RTIMING("Painter"); ImageBuffer ib(sz); BufferPainter sw(ib);