mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
Syncing uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@1681 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
47af6b0392
commit
46b40c284e
15 changed files with 4191 additions and 13759 deletions
|
|
@ -7,76 +7,17 @@ using namespace Upp;
|
|||
|
||||
#define LAYOUTFILE <CtrlLibTest/CtrlLibTest.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
/*
|
||||
class MagickRaster : public Raster
|
||||
{
|
||||
public:
|
||||
virtual Size GetSize() { return sz; }
|
||||
virtual Line GetLine(int line);
|
||||
virtual Info GetInfo();
|
||||
|
||||
MagickRaster(Magick::Image img);
|
||||
MagickRaster(Magick::Image img, int x, int y, int w, int h);
|
||||
private:
|
||||
Magick::PixelPacket * pixels;
|
||||
Size sz;
|
||||
|
||||
void SetImage(Magick::Image, int x, int y, int w, int h);
|
||||
};
|
||||
|
||||
MagickRaster::MagickRaster(Magick::Image)
|
||||
{
|
||||
SetImage(img, 0, 0, img.columns(), img.rows());
|
||||
}
|
||||
|
||||
MagickRaster::MagickRaster(Magick::Image, int x, int y, int w, int h)
|
||||
{
|
||||
SetImage(img, x, y, w, h);
|
||||
}
|
||||
|
||||
void MagickRaster::SetImage(Magick::Image, int x, int y, int w, int h)
|
||||
{
|
||||
pixels = Magick::getPixels(x, y, w, h);
|
||||
sz = Size(w, h);
|
||||
}
|
||||
|
||||
Line MagickRaster::GetLine(int line)
|
||||
{
|
||||
if (Magick::QuantumDepth == 8)
|
||||
return Line((const RGBA *)~lines[line], false);
|
||||
else
|
||||
return Line(~lines[line], this, false)
|
||||
}
|
||||
|
||||
Info MagickRaster::GetInfo()
|
||||
{
|
||||
Info f;
|
||||
f.bpp = Magick::QuantumDepth;
|
||||
f.colors = (1 << f.bpp)*3;
|
||||
f.dots = Size(0, 0);
|
||||
f.hotspot = Point(0, 0);
|
||||
f.kind = IMAGE_ALPHA;
|
||||
return f;
|
||||
}
|
||||
*/
|
||||
|
||||
class ChildWnd : public WithCtrlLibTestLayout<TopWindow> {
|
||||
public:
|
||||
typedef ChildWnd CLASSNAME;
|
||||
ChildWnd();
|
||||
};
|
||||
#define IMAGECLASS MyIm
|
||||
#define IMAGEFILE <CtrlLibTest/CtrlLibTest.iml>
|
||||
#include <Draw/iml_header.h>
|
||||
|
||||
class CtrlLibTest : public WithCtrlLibTestLayout<TopWindow> {
|
||||
public:
|
||||
ChildWnd wnd;
|
||||
|
||||
typedef CtrlLibTest CLASSNAME;
|
||||
CtrlLibTest();
|
||||
|
||||
void OnPush1();
|
||||
void OnPush2();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue