Added implementation for DrawPolyPolyPolygonOp and DrawPolyPolylineOp; added 'public' modifier to ST-variant of RWMutex::ReadLock / WriteLock to get rid of GCC complaints.

git-svn-id: svn://ultimatepp.org/upp/trunk@1450 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
rylek 2009-07-28 08:44:00 +00:00
parent e89702bcc4
commit 1264da8e6f
2 changed files with 37 additions and 0 deletions

View file

@ -487,11 +487,13 @@ public:
};
class RWMutex::ReadLock : NoCopy {
public:
ReadLock(RWMutex&) {}
~ReadLock() {}
};
class RWMutex::WriteLock : NoCopy {
public:
WriteLock(RWMutex&) {}
~WriteLock() {}
};

View file

@ -83,12 +83,47 @@ void Painter::DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color)
void Painter::DrawPolyPolylineOp(const Point *vertices, int vertex_count, const int *counts,
int count_count, int width, Color color, Color doxor)
{
while(--count_count >= 0) {
const Point *lp = vertices;
vertices += *counts++;
Move(*lp);
while(++lp < vertices)
Line(*lp);
Stroke(max(width, 0), color);
}
}
void Painter::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)
{
Image fill_img;
if(pattern && !IsNull(color)) {
ImageBuffer ibuf(8, 8);
RGBA r[2] = { color, RGBAZero() };
for(RGBA *out = ibuf, *end = out + 64; out < end; pattern >>= 1)
*out++ = r[(byte)pattern & 1];
fill_img = ibuf;
}
while(--dpcc >= 0) {
const Point *sp = vertices;
vertices += *disjunct_polygon_counts++;
while(sp < vertices) {
const Point *pp = sp;
sp += *subpolygon_counts++;
Move(*pp);
while(++pp < sp)
Line(*pp);
Close();
}
if(!IsNull(fill_img))
Fill(fill_img, Xform2D::Identity(), FILL_HREPEAT | FILL_VREPEAT);
else if(!IsNull(color))
Fill(color);
if(!IsNull(outline))
Stroke(max(width, 0), outline);
}
}
void Painter::DrawArcOp(const Rect& rc, Point start, Point end, int width, Color color)