.developing rainbow

git-svn-id: svn://ultimatepp.org/upp/trunk@3598 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-07-03 12:12:29 +00:00
parent e84b82dca1
commit 10d89989c8
6 changed files with 297 additions and 310 deletions

View file

@ -617,7 +617,6 @@ private:
void WndEnable0(bool *b);
bool WndEnable(bool b);
Rect GetWndUpdateRect() const;
Rect GetWndScreenRect() const;
void WndScrollView0(const Rect& r, int dx, int dy);
void WndScrollView(const Rect& r, int dx, int dy);

View file

@ -25,9 +25,6 @@ void Ctrl::RefreshFrame(const Rect& r) {
LLOG("WndInvalidateRect: " << r << ' ' << Name());
LTIMING("RefreshFrame InvalidateRect");
WndInvalidateRect(r);
#ifdef GUI_WIN
LLOG("UpdateRect: " << GetWndUpdateRect() << ' ' << Name());
#endif
}
}

View file

@ -918,16 +918,6 @@ void Ctrl::WndCreateCaret0(const Rect& cr)
::ShowCaret(hwnd);
}
Rect Ctrl::GetWndUpdateRect() const
{
GuiLock __;
HWND hwnd = GetHWND();
if(!hwnd) return Null;
Rect r;
::GetUpdateRect(hwnd, r, FALSE);
return r;
}
Rect Ctrl::GetWndScreenRect() const
{
GuiLock __;

View file

@ -1,261 +1,261 @@
#define GUI_X11
#define PLATFORM_X11 // To keep legacy code happy
#define Time XTime
#define Font XFont
#define Display XDisplay
#define Picture XPicture
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xft/Xft.h>
#include <X11/extensions/Xrender.h>
#undef Picture
#undef Time
#undef Font
#undef Display
#undef True
#undef False
#define XFalse 0
#define XTrue 1
NAMESPACE_UPP
extern XDisplay *Xdisplay;
extern Visual *Xvisual;
extern int Xscreenno;
extern Window Xroot;
extern Screen *Xscreen;
extern Colormap Xcolormap;
extern int Xheight;
extern int Xwidth;
extern int XheightMM;
extern int XwidthMM;
extern int Xdepth;
extern dword Xblack;
extern dword Xwhite;
extern int Xconnection;
extern dword (*Xgetpixel)(int r, int g, int b);
void InitX11Draw(const char *dispname = NULL);
void InitX11Draw(XDisplay *display);
void XError();
void XError(const char *s);
inline dword GetXPixel(int r, int g, int b) { return (*Xgetpixel)(r, g, b); }
inline dword GetXPixel(Color color) { return (*Xgetpixel)(color.GetR(), color.GetG(), color.GetB()); }
enum {
X11_ROP2_ZERO,
X11_ROP2_AND,
X11_ROP2_AND_NOT,
X11_ROP2_COPY,
X11_ROP2_NOT_AND,
X11_ROP2_NOP,
X11_ROP2_XOR,
X11_ROP2_OR,
X11_ROP2_NOT_AND_NOT,
X11_ROP2_NOT_XOR,
X11_ROP2_INVERT,
X11_ROP2_OR_NOT,
X11_ROP2_NOT_COPY,
X11_ROP2_NOT_OR,
X11_ROP2_NOT_OR_NOT,
X11_ROP2_ONE,
};
void SetClip(GC gc, XftDraw *xftdraw, const Vector<Rect>& cl);
class SystemDraw : public Draw {
public:
virtual dword GetInfo() const;
virtual Size GetPageSize() const;
virtual void BeginOp();
virtual void EndOp();
virtual void OffsetOp(Point p);
virtual bool ClipOp(const Rect& r);
virtual bool ClipoffOp(const Rect& r);
virtual bool ExcludeClipOp(const Rect& r);
virtual bool IntersectClipOp(const Rect& r);
virtual bool IsPaintingOp(const Rect& r) const;
virtual Rect GetPaintRect() const;
virtual void DrawRectOp(int x, int y, int cx, int cy, Color color);
virtual void DrawImageOp(int x, int y, int cx, int cy, const Image& img, const Rect& src, Color color);
virtual void DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color);
virtual void DrawPolyPolylineOp(const Point *vertices, int vertex_count,
const int *counts, int count_count,
int width, Color color, Color doxor);
virtual void DrawPolyPolyPolygonOp(const Point *vertices, int vertex_count,
const int *subpolygon_counts, int scc,
const int *disjunct_polygon_counts, int dpcc,
Color color, int width, Color outline,
uint64 pattern, Color doxor);
virtual void DrawArcOp(const Rect& rc, Point start, Point end, int width, Color color);
virtual void DrawEllipseOp(const Rect& r, Color color, int pen, Color pencolor);
virtual void DrawTextOp(int x, int y, int angle, const wchar *text, Font font,
Color ink, int n, const int *dx);
virtual Size GetNativeDpi() const;
virtual void BeginNative();
virtual void EndNative();
virtual int GetCloffLevel() const;
private:
Size pageSize;
SystemDraw();
friend class ImageDraw;
friend class FontInfo;
friend class Font;
friend class ViewDraw;
friend void StaticExitDraw_();
friend Font StdFont();
FontInfo lastFont;
Point actual_offset;
Point actual_offset_bak;
struct Cloff : Moveable<Cloff> {
Point org;
int clipi;
int offseti;
};
Array<Cloff> cloff;
Rect drawingclip;
Vector< Vector<Rect> > clip;
Vector<Point> offset;
Drawable dw;
GC gc;
XftDraw *xftdraw;
int foreground;
int linewidth;
void Init();
void Init(const Vector<Rect>& clip, Point offset = Point(0, 0));
void CloneClip();
friend class BackDraw;
friend class ScreenDraw;
public:
static void Flush() { XSync(Xdisplay, false); }
Point GetOffset() const { return actual_offset; }
static XftFont *CreateXftFont(Font f, int angle);
XftDraw *GetXftDraw() const { return xftdraw; }
Rect GetClip() const;
void SetForeground(Color color);
void SetLineStyle(int width);
void SetClip();
Drawable GetDrawable() const { return dw; }
GC GetGC() const { return gc; }
const Vector<Rect>& GetClipList() const { return clip.Top(); }
SystemDraw(Drawable dw, GC gc, XftDraw *xftdraw, const Vector<Rect>& clip);
bool CanSetSurface() { return true; }
};
Image X11Cursor(int c);
void *CursorX11(const Image& img);
class BackDraw : public SystemDraw {
public:
virtual bool IsPaintingOp(const Rect& r) const;
protected:
Pixmap pixmap;
Size size;
Draw *painting;
Point painting_offset;
public:
void Put(SystemDraw& w, int x, int y);
void Put(SystemDraw& w, Point p) { Put(w, p.x, p.y); }
void Create(SystemDraw& w, int cx, int cy);
void Create(SystemDraw& w, Size sz) { Create(w, sz.cx, sz.cy); }
void Destroy();
void SetPaintingDraw(Draw& w, Point off) { painting = &w; painting_offset = off; }
BackDraw();
~BackDraw();
};
class ImageDraw : public SystemDraw {
Size size;
SystemDraw alpha;
bool has_alpha;
void Init();
Image Get(bool pm) const;
public:
Draw& Alpha();
operator Image() const;
Image GetStraight() const;
ImageDraw(Size sz);
ImageDraw(int cx, int cy);
~ImageDraw();
};
END_UPP_NAMESPACE
#include "X11/keysym.h"
#define GUIPLATFORM_KEYCODES_INCLUDE "X11Keys.h"
#define GUIPLATFORM_CTRL_TOP_DECLS \
Window window;
#define GUIPLATFORM_CTRL_DECLS_INCLUDE "X11Ctrl.h"
#define GUIPLATFORM_TOPWINDOW_DECLS_INCLUDE "X11Top.h"
#define GUIPLATFORM_PASTECLIP_DECLS \
int type;
NAMESPACE_UPP
String XAtomName(Atom atom);
Atom XAtom(const char *name);
String GetProperty(Window w, Atom property, Atom rtype = AnyPropertyType);
Vector<int> GetPropertyInts(Window w, Atom property, Atom rtype = AnyPropertyType);
String ReadPropertyData(Window w, Atom property, Atom rtype = AnyPropertyType);
Index<Atom>& _NET_Supported();
#include "stdids.h"
#define GUIPLATFORM_INCLUDE_AFTER "X11GuiA.h"
END_UPP_NAMESPACE
#define GUI_X11
#define PLATFORM_X11 // To keep legacy code happy
#define Time XTime
#define Font XFont
#define Display XDisplay
#define Picture XPicture
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xft/Xft.h>
#include <X11/extensions/Xrender.h>
#undef Picture
#undef Time
#undef Font
#undef Display
#undef True
#undef False
#define XFalse 0
#define XTrue 1
NAMESPACE_UPP
extern XDisplay *Xdisplay;
extern Visual *Xvisual;
extern int Xscreenno;
extern Window Xroot;
extern Screen *Xscreen;
extern Colormap Xcolormap;
extern int Xheight;
extern int Xwidth;
extern int XheightMM;
extern int XwidthMM;
extern int Xdepth;
extern dword Xblack;
extern dword Xwhite;
extern int Xconnection;
extern dword (*Xgetpixel)(int r, int g, int b);
void InitX11Draw(const char *dispname = NULL);
void InitX11Draw(XDisplay *display);
void XError();
void XError(const char *s);
inline dword GetXPixel(int r, int g, int b) { return (*Xgetpixel)(r, g, b); }
inline dword GetXPixel(Color color) { return (*Xgetpixel)(color.GetR(), color.GetG(), color.GetB()); }
enum {
X11_ROP2_ZERO,
X11_ROP2_AND,
X11_ROP2_AND_NOT,
X11_ROP2_COPY,
X11_ROP2_NOT_AND,
X11_ROP2_NOP,
X11_ROP2_XOR,
X11_ROP2_OR,
X11_ROP2_NOT_AND_NOT,
X11_ROP2_NOT_XOR,
X11_ROP2_INVERT,
X11_ROP2_OR_NOT,
X11_ROP2_NOT_COPY,
X11_ROP2_NOT_OR,
X11_ROP2_NOT_OR_NOT,
X11_ROP2_ONE,
};
void SetClip(GC gc, XftDraw *xftdraw, const Vector<Rect>& cl);
class SystemDraw : public Draw {
public:
virtual dword GetInfo() const;
virtual Size GetPageSize() const;
virtual void BeginOp();
virtual void EndOp();
virtual void OffsetOp(Point p);
virtual bool ClipOp(const Rect& r);
virtual bool ClipoffOp(const Rect& r);
virtual bool ExcludeClipOp(const Rect& r);
virtual bool IntersectClipOp(const Rect& r);
virtual bool IsPaintingOp(const Rect& r) const;
virtual Rect GetPaintRect() const;
virtual void DrawRectOp(int x, int y, int cx, int cy, Color color);
virtual void DrawImageOp(int x, int y, int cx, int cy, const Image& img, const Rect& src, Color color);
virtual void DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color);
virtual void DrawPolyPolylineOp(const Point *vertices, int vertex_count,
const int *counts, int count_count,
int width, Color color, Color doxor);
virtual void DrawPolyPolyPolygonOp(const Point *vertices, int vertex_count,
const int *subpolygon_counts, int scc,
const int *disjunct_polygon_counts, int dpcc,
Color color, int width, Color outline,
uint64 pattern, Color doxor);
virtual void DrawArcOp(const Rect& rc, Point start, Point end, int width, Color color);
virtual void DrawEllipseOp(const Rect& r, Color color, int pen, Color pencolor);
virtual void DrawTextOp(int x, int y, int angle, const wchar *text, Font font,
Color ink, int n, const int *dx);
virtual Size GetNativeDpi() const;
virtual void BeginNative();
virtual void EndNative();
virtual int GetCloffLevel() const;
private:
Size pageSize;
SystemDraw();
friend class ImageDraw;
friend class FontInfo;
friend class Font;
friend class ViewDraw;
friend void StaticExitDraw_();
friend Font StdFont();
FontInfo lastFont;
Point actual_offset;
Point actual_offset_bak;
struct Cloff : Moveable<Cloff> {
Point org;
int clipi;
int offseti;
};
Array<Cloff> cloff;
Rect drawingclip;
Vector< Vector<Rect> > clip;
Vector<Point> offset;
Drawable dw;
GC gc;
XftDraw *xftdraw;
int foreground;
int linewidth;
void Init();
void Init(const Vector<Rect>& clip, Point offset = Point(0, 0));
void CloneClip();
friend class BackDraw;
friend class ScreenDraw;
public:
static void Flush() { XSync(Xdisplay, false); }
Point GetOffset() const { return actual_offset; }
static XftFont *CreateXftFont(Font f, int angle);
XftDraw *GetXftDraw() const { return xftdraw; }
Rect GetClip() const;
void SetForeground(Color color);
void SetLineStyle(int width);
void SetClip();
Drawable GetDrawable() const { return dw; }
GC GetGC() const { return gc; }
const Vector<Rect>& GetClipList() const { return clip.Top(); }
SystemDraw(Drawable dw, GC gc, XftDraw *xftdraw, const Vector<Rect>& clip);
bool CanSetSurface() { return true; }
};
Image X11Cursor(int c);
void *CursorX11(const Image& img);
class BackDraw : public SystemDraw {
public:
virtual bool IsPaintingOp(const Rect& r) const;
protected:
Pixmap pixmap;
Size size;
Draw *painting;
Point painting_offset;
public:
void Put(SystemDraw& w, int x, int y);
void Put(SystemDraw& w, Point p) { Put(w, p.x, p.y); }
void Create(SystemDraw& w, int cx, int cy);
void Create(SystemDraw& w, Size sz) { Create(w, sz.cx, sz.cy); }
void Destroy();
void SetPaintingDraw(Draw& w, Point off) { painting = &w; painting_offset = off; }
BackDraw();
~BackDraw();
};
class ImageDraw : public SystemDraw {
Size size;
SystemDraw alpha;
bool has_alpha;
void Init();
Image Get(bool pm) const;
public:
Draw& Alpha();
operator Image() const;
Image GetStraight() const;
ImageDraw(Size sz);
ImageDraw(int cx, int cy);
~ImageDraw();
};
END_UPP_NAMESPACE
#include "X11/keysym.h"
#define GUIPLATFORM_KEYCODES_INCLUDE "X11Keys.h"
#define GUIPLATFORM_CTRL_TOP_DECLS \
Window window;
#define GUIPLATFORM_CTRL_DECLS_INCLUDE "X11Ctrl.h"
#define GUIPLATFORM_TOPWINDOW_DECLS_INCLUDE "X11Top.h"
#define GUIPLATFORM_PASTECLIP_DECLS \
int type;
NAMESPACE_UPP
String XAtomName(Atom atom);
Atom XAtom(const char *name);
String GetProperty(Window w, Atom property, Atom rtype = AnyPropertyType);
Vector<int> GetPropertyInts(Window w, Atom property, Atom rtype = AnyPropertyType);
String ReadPropertyData(Window w, Atom property, Atom rtype = AnyPropertyType);
Index<Atom>& _NET_Supported();
#include "stdids.h"
#define GUIPLATFORM_INCLUDE_AFTER "X11GuiA.h"
END_UPP_NAMESPACE

View file

@ -238,7 +238,7 @@ IMAGE_BEGIN_DATA
IMAGE_DATA(120,156,237,90,223,79,28,85,20,30,160,13,160,248,96,82,27,255,0,95,124,52,241,201,104,226,139,47,250,164,182,233)
IMAGE_DATA(155,137,198,248,208,23,147,38,245,165,182,146,38,141,177,6,99,52,54,214,40,161,214,31,141,11,129,96,113,161,148,117)
IMAGE_DATA(149,108,64,86,126,164,42,89,8,1,182,44,200,238,150,165,44,11,101,113,155,227,124,3,151,206,189,123,239,220,153,133)
IMAGE_DATA(45,44,236,185,249,50,51,247,126,247,59,103,238,156,123,118,55,59,70,157,113,196,168,50,42,13,216,157,120,132,128,222)
IMAGE_DATA(45,44,236,185,249,50,179,247,126,247,59,103,238,156,123,102,55,59,70,157,113,196,168,50,42,13,216,157,120,132,128,222)
IMAGE_DATA(96,27,249,127,254,142,154,175,93,230,128,62,140,49,30,227,2,19,99,127,80,44,58,178,213,143,115,244,177,113,214,15)
IMAGE_DATA(13,244,7,70,238,72,129,49,112,24,31,126,161,213,51,156,148,2,99,224,216,249,56,246,12,39,164,176,115,236,231,55)
IMAGE_DATA(135,226,82,236,20,191,123,112,94,10,53,255,95,41,212,252,57,41,84,252,27,127,206,74,177,83,252,174,112,76,10,53)
@ -252,40 +252,40 @@ IMAGE_DATA(73,14,58,126,60,30,231,160,227,207,205,205,113,208,241,99,177,24,7,29
IMAGE_DATA(200,93,240,7,6,6,56,128,223,240,201,143,28,31,185,138,60,199,152,12,23,46,94,165,23,79,156,177,248,216,47,108)
IMAGE_DATA(63,32,207,145,187,240,15,64,23,220,147,103,46,89,192,126,193,94,196,94,3,31,126,196,253,8,93,112,177,23,1,236)
IMAGE_DATA(97,28,49,87,101,24,99,220,93,43,22,189,215,62,160,104,215,89,162,240,251,22,110,119,159,163,144,239,188,180,88,128)
IMAGE_DATA(75,237,207,231,33,241,205,83,228,251,244,173,188,98,97,233,130,35,24,248,193,47,143,231,61,108,43,6,147,47,22,11)
IMAGE_DATA(240,71,175,188,172,228,139,197,66,199,207,100,50,28,116,124,246,80,25,116,252,133,133,5,14,58,126,34,145,224,161,225)
IMAGE_DATA(75,237,207,231,33,241,205,83,228,251,244,173,188,98,97,233,130,35,24,248,193,47,143,231,221,108,43,6,147,47,22,11)
IMAGE_DATA(240,71,175,188,172,228,139,197,66,199,207,100,50,28,116,124,118,83,25,116,252,133,133,5,14,58,126,34,145,224,161,225)
IMAGE_DATA(207,207,207,115,208,241,197,205,175,227,207,204,204,112,208,241,197,205,175,227,71,34,17,14,58,254,200,200,8,7,21,31)
IMAGE_DATA(185,11,126,95,95,31,7,240,127,187,124,34,175,88,32,207,49,38,67,203,103,239,72,139,5,242,28,185,11,255,0,116)
IMAGE_DATA(193,61,16,197,162,165,195,111,93,179,7,135,197,109,243,223,144,22,11,112,197,7,205,128,57,98,177,176,235,138,128,31)
IMAGE_DATA(241,97,171,184,12,101,254,193,227,143,141,141,73,33,227,35,167,198,199,199,165,232,239,239,207,43,22,200,89,21,191,189)
IMAGE_DATA(43,32,45,22,152,3,63,44,102,232,130,187,171,197,162,16,248,253,126,242,249,124,212,212,212,196,1,125,24,19,185,0)
IMAGE_DATA(42,53,110,154,245,227,28,125,108,156,245,67,3,253,42,223,24,3,135,93,195,175,93,87,4,198,192,177,243,117,247,87)
IMAGE_DATA(230,151,249,78,124,47,249,230,53,159,189,238,23,54,199,237,126,244,2,227,49,179,85,152,173,108,101,43,9,43,39,108)
IMAGE_DATA(217,74,202,234,204,86,76,235,188,126,149,58,175,95,33,79,252,14,247,124,24,190,99,122,143,204,193,191,45,94,93,252)
IMAGE_DATA(44,94,22,131,155,248,197,120,183,19,191,46,94,233,181,36,94,47,241,203,236,118,116,130,140,234,205,239,245,155,70,14)
IMAGE_DATA(80,141,171,230,203,140,239,23,156,171,137,122,7,94,2,222,192,33,211,189,11,231,238,196,212,193,201,131,21,156,171,238)
IMAGE_DATA(70,118,119,94,2,145,235,31,54,170,100,159,120,186,103,153,239,76,16,242,178,44,188,195,90,115,57,42,54,255,181,246)
IMAGE_DATA(96,186,44,115,155,165,94,2,118,202,126,149,190,251,248,53,11,225,70,208,109,96,197,90,24,167,56,221,215,168,106,115)
IMAGE_DATA(41,10,88,8,175,117,105,59,117,172,216,227,27,166,88,136,221,12,236,97,45,48,111,219,172,90,15,206,21,85,75,117)
IMAGE_DATA(174,174,90,143,219,162,193,255,245,11,137,113,74,37,39,104,113,97,138,238,166,162,180,180,24,163,229,165,57,202,164,231)
IMAGE_DATA(105,101,57,73,171,43,11,116,111,245,46,101,215,210,180,158,93,161,255,214,239,81,46,183,78,247,239,231,54,62,204,139)
IMAGE_DATA(42,136,55,12,218,90,26,233,151,246,239,169,219,239,163,96,79,59,133,126,239,164,129,254,0,13,15,134,232,159,191,194)
IMAGE_DATA(52,30,185,69,83,147,17,154,157,153,162,68,124,150,22,83,73,202,100,210,148,205,174,61,132,8,247,190,224,222,92,195)
IMAGE_DATA(10,83,178,116,4,119,100,13,75,235,150,15,200,26,214,152,141,21,86,229,63,11,182,31,78,207,156,12,145,10,165,62)
IMAGE_DATA(223,92,10,199,47,48,121,102,77,82,28,97,165,126,100,73,33,59,154,31,200,15,62,146,95,122,237,52,217,33,237,59)
IMAGE_DATA(108,182,202,205,213,21,7,25,236,102,239,99,158,157,120,121,14,143,152,155,165,214,124,168,110,76,149,47,133,218,166,6)
IMAGE_DATA(49,233,253,166,39,206,113,210,211,233,203,214,92,167,167,210,100,243,10,136,79,59,71,146,35,174,198,68,173,237,66,166)
IMAGE_DATA(185,221,248,138,177,126,246,113,175,122,42,45,97,190,151,248,60,153,147,94,33,86,10,122,66,126,56,219,81,179,184,62)
IMAGE_DATA(82,96,113,117,237,196,133,174,93,222,216,225,197,221,171,186,78,27,80,165,235,102,67,21,170,171,210,214,196,226,38,94)
IMAGE_DATA(101,191,161,72,43,153,174,140,99,215,182,247,57,65,156,175,227,22,43,222,98,174,175,125,188,80,93,149,166,160,83,72)
IMAGE_DATA(188,158,204,141,110,33,86,138,186,138,188,114,182,42,243,43,59,251,65,132,9,236,205,24,213,185,248,10,106,107,107,171)
IMAGE_DATA(5,207,66,236,197,116,192,254,130,110,158,16,188,176,201,178,115,123,52,246,119,102,188,71,100,59,231,132,170,205,134,223)
IMAGE_DATA(66,204,240,59,255,248,235,175,108,1,215,172,191,254,236,41,238,1,224,154,241,101,198,52,10,25,115,242,231,20,231,254)
IMAGE_DATA(187,161,26,227,209,173,191,238,48,233,111,69,99,246,147,162,49,59,167,104,204,142,41,26,179,167,21,141,153,161,104,110)
IMAGE_DATA(231,235,252,235,226,215,221,191,211,250,153,75,93,99,229,144,83,221,145,25,4,224,4,129,32,88,220,16,110,26,71,92)
IMAGE_DATA(163,31,227,204,217,126,229,122,49,163,214,120,130,219,170,176,250,250,122,178,67,172,233,232,19,235,180,157,39,27,23,121)
IMAGE_DATA(101,78,153,179,23,56,91,27,160,210,172,59,229,13,80,230,28,52,142,245,170,129,211,39,128,83,226,235,28,49,141,189)
IMAGE_DATA(50,166,90,12,224,127,88,40,37,162,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
IMAGE_DATA(193,61,16,197,162,165,195,111,125,102,55,14,139,219,230,191,33,45,22,224,138,55,154,1,115,196,98,97,215,21,1,63)
IMAGE_DATA(226,205,86,113,25,202,252,131,199,31,27,27,147,66,198,71,78,141,143,143,75,209,223,223,159,87,44,144,179,42,126,123)
IMAGE_DATA(87,64,90,44,48,7,126,88,204,208,5,119,87,139,69,33,240,251,253,228,243,249,168,169,169,137,3,250,48,38,114,1)
IMAGE_DATA(84,106,92,52,235,199,57,250,216,56,235,135,6,250,85,190,49,6,14,251,12,191,118,93,17,24,3,199,206,215,93,95)
IMAGE_DATA(153,95,230,59,241,189,228,155,215,124,246,186,95,216,28,183,251,209,11,140,199,204,86,97,182,178,149,173,36,172,156,176)
IMAGE_DATA(101,43,41,171,51,91,49,173,243,250,85,234,188,126,133,60,241,59,220,243,97,248,142,233,61,50,7,255,182,120,117,241)
IMAGE_DATA(179,120,89,12,110,226,23,227,221,78,252,186,120,165,159,37,241,122,137,95,102,183,163,19,100,84,111,126,175,223,52,114)
IMAGE_DATA(128,106,92,53,95,102,124,191,224,92,77,212,59,240,18,240,6,14,153,238,93,56,119,39,166,14,78,30,172,224,92,117)
IMAGE_DATA(53,178,171,243,18,136,92,255,176,81,37,123,226,233,238,101,190,51,65,200,203,178,240,14,107,205,229,168,216,252,215,218)
IMAGE_DATA(131,233,178,204,109,150,122,9,216,41,251,85,250,238,227,215,44,132,27,65,183,129,21,107,97,156,226,116,95,163,170,205)
IMAGE_DATA(165,40,96,33,188,214,165,237,212,177,98,143,111,152,98,33,118,51,176,135,181,192,188,109,179,106,61,56,87,84,45,213)
IMAGE_DATA(185,186,106,61,110,139,6,255,215,47,36,198,41,149,156,160,197,133,41,186,155,138,210,210,98,140,150,151,230,40,147,158)
IMAGE_DATA(167,149,229,36,173,174,44,208,189,213,187,148,93,75,211,122,118,133,254,91,191,71,185,220,58,221,191,159,219,120,152,23)
IMAGE_DATA(85,16,111,24,180,181,52,210,47,237,223,83,183,223,71,193,158,118,10,253,222,73,3,253,1,26,30,12,209,63,127,133)
IMAGE_DATA(105,60,114,139,166,38,35,52,59,51,69,137,248,44,45,166,146,148,201,164,41,155,93,123,8,17,238,125,193,189,185,134)
IMAGE_DATA(21,166,100,233,8,238,200,26,150,214,37,31,144,53,172,49,27,43,172,202,127,22,108,63,156,158,57,25,34,21,74,125)
IMAGE_DATA(190,185,20,142,95,96,242,204,154,164,56,194,74,253,200,146,66,118,52,31,200,15,30,201,47,189,118,154,236,128,137,125)
IMAGE_DATA(230,51,252,176,185,182,149,210,9,246,137,204,188,246,229,57,60,98,110,150,90,243,166,186,49,18,204,117,14,56,232,25)
IMAGE_DATA(155,95,70,246,163,158,56,199,73,79,167,47,91,115,157,158,74,147,205,43,32,62,237,28,73,142,184,26,19,181,182,11)
IMAGE_DATA(153,230,118,227,43,198,250,217,199,189,234,169,180,132,249,94,226,243,100,78,122,133,88,41,232,9,249,225,108,71,205,226)
IMAGE_DATA(250,72,129,197,213,181,19,23,186,118,121,99,135,23,119,175,234,58,109,64,149,174,155,13,85,168,174,74,91,19,139,155)
IMAGE_DATA(120,149,253,134,34,173,100,186,50,142,93,219,222,231,4,113,190,142,91,172,120,139,185,190,246,241,66,117,85,154,130,78)
IMAGE_DATA(33,241,122,50,55,186,133,88,41,234,42,242,202,217,170,204,175,236,236,7,17,38,176,55,99,84,231,226,43,168,173,173)
IMAGE_DATA(173,22,60,11,177,23,211,1,251,11,186,121,66,240,194,38,203,206,237,209,216,223,153,241,30,145,237,156,19,170,54,27)
IMAGE_DATA(126,11,49,195,239,252,227,175,191,178,5,124,102,253,245,103,79,113,55,0,159,25,95,102,76,163,144,49,39,127,78,113)
IMAGE_DATA(238,191,11,170,49,30,221,250,235,14,147,254,86,52,102,63,41,26,179,115,138,198,236,152,162,49,123,90,209,152,25,138)
IMAGE_DATA(230,118,190,206,191,46,126,221,245,59,173,159,185,212,53,86,14,57,213,29,153,65,0,78,16,8,130,197,5,225,162,113)
IMAGE_DATA(196,103,244,99,156,57,219,175,92,47,102,212,26,79,112,91,21,86,95,95,79,118,136,53,29,125,98,157,182,243,100,227)
IMAGE_DATA(34,175,204,41,115,246,2,103,107,3,84,154,117,167,188,1,202,156,131,198,177,94,53,112,122,2,56,37,190,206,17,211)
IMAGE_DATA(216,43,99,170,197,0,254,7,225,55,45,154,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
IMAGE_END_DATA(1632, 53)
IMAGE_BEGIN_DATA

View file

@ -80,6 +80,8 @@ void Painter::DrawImageOp(int x, int y, int cx, int cy, const Image& image, cons
void Painter::DrawLineStroke(int width, Color color)
{
if(IsNull(width) || IsNull(color))
return;
Begin();
LineCap(LINECAP_ROUND);
switch(width) {
@ -185,8 +187,7 @@ void Painter::DrawEllipseOp(const Rect& r, Color color, int pen, Color pencolor)
Sizef sz = r.GetSize();
Ellipse(r.left + sz.cx / 2, r.top + sz.cy / 2, sz.cx / 2, sz.cy / 2);
Fill(color);
if(!IsNull(pencolor))
DrawLineStroke(pen, pencolor);
DrawLineStroke(pen, pencolor);
}
void Painter::DrawTextOp(int x, int y, int angle, const wchar *text, Font font, Color ink, int n, const int *dx)