ultimatepp/uppdev/Reports/main.cpp
cxl 208a003677 .uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@6579 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2013-11-19 15:14:03 +00:00

25 lines
541 B
C++

#include <Report/Report.h>
using namespace Upp;
void Background(Report *r)
{
LOG("Background");
DDUMP(r->GetPages().GetCount());
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.OnPage(callback1(Background, &r)).Header("THIS IS HEADER!");
r << LoadFile(GetHomeDirFile("smlouva.qtf"));
Perform(r);
}