mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Syncing uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@1948 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c54230c225
commit
87c9dbee46
7 changed files with 108 additions and 0 deletions
11
uppdev/PainterBug/PainterBug.upp
Normal file
11
uppdev/PainterBug/PainterBug.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
uses
|
||||
CtrlLib,
|
||||
Painter;
|
||||
|
||||
file
|
||||
Pictures.iml,
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
12
uppdev/PainterBug/Pictures.iml
Normal file
12
uppdev/PainterBug/Pictures.iml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
PREMULTIPLIED
|
||||
IMAGE_ID(WindowBg)
|
||||
IMAGE_ID(Button0)
|
||||
IMAGE_ID(Button1)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,99,16,96,208,96,96,101,144,101,224,98,80,98,0,2,126,42,96,5,50,49,186,126,107,34,49,54,253,48,57)
|
||||
IMAGE_DATA(127,2,24,217,12,116,253,32,249,68,2,216,159,144,254,253,251,247,191,199,134,71,245,143,234,31,213,63,170,127,84,255)
|
||||
IMAGE_DATA(240,214,191,122,245,234,107,216,240,168,126,250,232,39,128,241,233,167,164,253,128,108,6,57,237,23,114,48,63,197,88,0)
|
||||
IMAGE_DATA(8,153,128,144,23,8,207,80,1,48,144,9,70,245,143,234,31,213,79,185,126,74,0,213,11,3,106,0,74,3,98,84)
|
||||
IMAGE_DATA(255,168,254,161,172,127,160,0,0,226,73,178,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(160, 3)
|
||||
5
uppdev/PainterBug/init
Normal file
5
uppdev/PainterBug/init
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef _PainterBug_icpp_init_stub
|
||||
#define _PainterBug_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#include "Painter/init"
|
||||
#endif
|
||||
46
uppdev/PainterBug/main.cpp
Normal file
46
uppdev/PainterBug/main.cpp
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
#include <Painter/Painter.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define IMAGECLASS Images
|
||||
#define IMAGEFILE <PainterBug/Pictures.iml>
|
||||
#include <Draw/iml.h>
|
||||
|
||||
struct App : TopWindow
|
||||
{
|
||||
App()
|
||||
{
|
||||
Sizeable();
|
||||
Zoomable();
|
||||
}
|
||||
|
||||
virtual void Paint(Draw& w)
|
||||
{
|
||||
Size sz = GetSize();
|
||||
w.DrawRect(sz, White);
|
||||
|
||||
|
||||
w.DrawText(10, 2, "GDI");
|
||||
w.DrawText(250, 2, "Painter");
|
||||
|
||||
int cx = 200;
|
||||
int cy = 150;
|
||||
|
||||
ChPaint(w, Rect(10, 20, 10 + cx, 20 + cy), Images::WindowBg());
|
||||
|
||||
ImageBuffer ib(cx, cy);
|
||||
BufferPainter bp(ib);
|
||||
|
||||
bp.Clear(RGBAZero());
|
||||
|
||||
ChPaint(bp, Rect(0, 0, cx, cy), Images::WindowBg());
|
||||
|
||||
w.DrawImage(250, 20, ib);
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
App().Run();
|
||||
}
|
||||
10
uppdev/QtfAA/QtfAA.upp
Normal file
10
uppdev/QtfAA/QtfAA.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses
|
||||
CtrlLib,
|
||||
Painter;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
5
uppdev/QtfAA/init
Normal file
5
uppdev/QtfAA/init
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef _QtfAA_icpp_init_stub
|
||||
#define _QtfAA_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#include "Painter/init"
|
||||
#endif
|
||||
19
uppdev/QtfAA/main.cpp
Normal file
19
uppdev/QtfAA/main.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
ImageDraw idw(1200, 600);
|
||||
idw.DrawRect(0, 0, 1200, 600, White);
|
||||
idw.DrawText(0, 0, "(Hello)", Serif(400));
|
||||
|
||||
Image m = idw;
|
||||
PNGEncoder().SaveFile("u:/h.png", m);
|
||||
|
||||
DrawingDraw dw(350, 250);
|
||||
dw.DrawImage(0, 0, 350, 250, m);
|
||||
QtfRichObject pict(CreateDrawingObject(dw.GetResult(), Size(350, 250), Size(350, 250)));
|
||||
|
||||
PromptOK(String("[A5 Rendering problem: ") + pict.ToString());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue