Painter linux fixes

git-svn-id: svn://ultimatepp.org/upp/trunk@762 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-01-16 16:30:13 +00:00
parent 12ad01cb83
commit 51be4695ec
4 changed files with 271 additions and 263 deletions

View file

@ -72,9 +72,10 @@ void Painter::DrawImageOp(int x, int y, int cx, int cy, const Image& img, const
void Painter::DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color)
{
Move(x1, y1);
Line(x2, y2);
Stroke(width, color);
double h = width / 2;
Move(x1 + h, y1 + h);
Line(x2 + h, y2 + h);
Stroke(max(width, 0), color);
}
void Painter::DrawPolyPolylineOp(const Point *vertices, int vertex_count, const int *counts,
@ -94,6 +95,10 @@ void Painter::DrawArcOp(const Rect& rc, Point start, Point end, int width, Color
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);
Stroke(max(pen, 0), pencolor);
}
void Painter::DrawTextOp(int x, int y, int angle, const wchar *text, Font font, Color ink, int n, const int *dx)

View file

@ -24,7 +24,7 @@ file
Mask.cpp,
Painting.h,
Painting.cpp,
PaintPainting.cpp,
PaintPainting.icpp,
agg readonly separator,
agg_array.h,
agg_alpha_mask_u8.h,

View file

@ -1,3 +1,6 @@
#ifndef _Painter_icpp_init_stub
#define _Painter_icpp_init_stub
#define BLITZ_INDEX__ F442436F1D94F4DCDEB7D84575E2DBAB7
#include "PaintPainting.icpp"
#undef BLITZ_INDEX__
#endif