diff --git a/upptst/InVector/InVector.cpp b/upptst/InVector/InVector.cpp index c3488eb4a..a0607064c 100644 --- a/upptst/InVector/InVector.cpp +++ b/upptst/InVector/InVector.cpp @@ -242,7 +242,7 @@ CONSOLE_APP_MAIN { StdLogSetup(LOG_FILE|LOG_COUT); SeedRandom(); -/* + SetTest(); TestLowerBound(); TestUpperBound(); @@ -256,7 +256,7 @@ CONSOLE_APP_MAIN RemoveTest(); InsertNTest(); InVectorTest(); -*/ + SetTest(); TestLowerBound(); TestUpperBound(); diff --git a/upptst/PrintBg/PrintBg.upp b/upptst/PrintBg/PrintBg.upp new file mode 100644 index 000000000..e69de29bb diff --git a/upptst/PrintImage/Arrow.iml b/upptst/PrintImage/Arrow.iml new file mode 100644 index 000000000..e913d6604 --- /dev/null +++ b/upptst/PrintImage/Arrow.iml @@ -0,0 +1,17 @@ +PREMULTIPLIED +IMAGE_ID(Arrow) + +IMAGE_BEGIN_DATA +IMAGE_DATA(120,156,237,151,91,170,133,48,12,69,29,207,253,60,243,31,148,239,183,246,176,47,20,228,160,54,105,99,154,15,23,244) +IMAGE_DATA(79,208,213,186,147,180,248,20,127,133,199,9,179,174,171,235,251,222,53,77,163,178,198,113,116,251,190,139,58,76,211,228) +IMAGE_DATA(170,170,114,101,89,170,46,236,155,4,216,15,236,139,246,247,251,133,115,145,112,192,126,228,114,144,242,200,237,32,229,49) +IMAGE_DATA(12,131,171,235,90,116,113,51,38,245,95,109,219,38,186,186,174,83,247,144,4,123,194,117,176,230,129,190,211,182,109,182) +IMAGE_DATA(124,72,0,7,124,75,206,156,167,178,44,203,127,182,67,223,122,247,76,110,15,106,255,71,102,144,157,171,51,203,229,193) +IMAGE_DATA(233,255,168,235,126,126,178,228,65,237,255,56,39,156,215,113,6,180,226,65,205,51,178,128,103,127,177,224,65,205,51,106) +IMAGE_DATA(239,153,131,5,143,121,158,73,14,200,51,250,249,21,185,60,240,111,83,107,18,50,19,186,15,229,240,224,212,36,234,157) +IMAGE_DATA(78,219,131,91,147,168,104,122,80,231,85,228,5,217,231,160,229,65,173,73,161,60,231,244,224,206,24,49,60,233,17,59) +IMAGE_DATA(99,88,242,72,153,49,36,61,112,198,177,80,243,12,7,244,65,9,206,60,238,250,127,8,234,221,45,166,38,113,60,98) +IMAGE_DATA(235,133,119,160,204,122,120,38,118,159,40,30,148,254,127,134,244,140,17,3,222,15,23,78,239,60,242,196,140,161,141,118) +IMAGE_DATA(77,122,2,206,140,33,85,147,164,73,189,187,89,1,189,55,228,144,82,187,181,8,245,136,148,218,173,205,85,157,178,154) +IMAGE_DATA(231,59,142,125,131,123,239,177,8,254,51,235,89,120,121,121,57,231,11,8,76,70,51,0,0,0,0,0,0,0,0,0) +IMAGE_END_DATA(384, 1) diff --git a/upptst/PrintImage/PrintImage.upp b/upptst/PrintImage/PrintImage.upp new file mode 100644 index 000000000..6a15debf5 --- /dev/null +++ b/upptst/PrintImage/PrintImage.upp @@ -0,0 +1,10 @@ +uses + CtrlLib; + +file + main.cpp, + Arrow.iml; + +mainconfig + "" = "GUI SSE2"; + diff --git a/upptst/PrintImage/init b/upptst/PrintImage/init new file mode 100644 index 000000000..8fe146aca --- /dev/null +++ b/upptst/PrintImage/init @@ -0,0 +1,4 @@ +#ifndef _PrintImage_icpp_init_stub +#define _PrintImage_icpp_init_stub +#include "CtrlLib/init" +#endif diff --git a/upptst/PrintImage/main.cpp b/upptst/PrintImage/main.cpp new file mode 100644 index 000000000..156125635 --- /dev/null +++ b/upptst/PrintImage/main.cpp @@ -0,0 +1,25 @@ +#include + +using namespace Upp; + +#define IMAGECLASS ArrowImg +#define IMAGEFILE +#include + +#define IMAGECLASS ArrowImg +#define IMAGEFILE +#include + +GUI_APP_MAIN +{ + PrinterJob pd("test"); + if(!pd.Execute()) + return; + Draw& w = pd; + Size sz = w.GetPageSize(); + w.StartPage(); + Size isz = CtrlImg::exclamation().GetSize(); + w.DrawImage(1000, 0, 500, 500, ArrowImg::Arrow()); + w.DrawImage(0, 0, 500, 500, CtrlImg::exclamation()); + w.EndPage(); +} diff --git a/upptst/ReportTest/main.cpp b/upptst/ReportTest/main.cpp index 61c7edf39..bc2c3c0eb 100644 --- a/upptst/ReportTest/main.cpp +++ b/upptst/ReportTest/main.cpp @@ -2,12 +2,24 @@ using namespace Upp; +void Background(Report *r) +{ + Draw& w = *r; + Size sz = r->GetSize(); + Image m = CtrlImg::exclamation(); + Size isz = m.GetSize(); + for(int x = -isz.cx / 2; x < sz.cx; x += isz.cx) + for(int y = -isz.cy / 2; y < sz.cy; y += isz.cy) + w.DrawImage(x, y, m); +} + GUI_APP_MAIN { Report r; + r.WhenPage = callback1(Background, &r); r.Header("[A2< Header Page $$P"); r.Footer("[A2> Footer Page $$P"); - r << "This is some [* QTF text"; + r << "This is some [* QTF text&something else"; r << t_("顯示[* QTF 文字"); r << "&&Let's report some table:"; r << t_("輸出表格式報表:");