Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » problems drawing in Linux (ubuntu 7.10)
Re: problems drawing in Linux (ubuntu 7.10) [message #15328 is a reply to message #15327] |
Wed, 16 April 2008 14:15 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Fix for the polygon problem:
static void DrawPolyPolyPolygonRaw(Draw& draw, const Point *vertices, int vertex_count,
const int *subpolygon_counts, int subpolygon_count_count, const int *, int)
{
DrawLock __;
Point offset = draw.GetOffset();
const Point *in = vertices;
for(int i = 0; i < subpolygon_count_count; i++) {
int n = subpolygon_counts[i];
Buffer<XPoint> out_points(n);
XPoint *t = out_points;
XPoint *e = t + n;
while(t < e) {
t->x = (short)(in->x + offset.x);
t->y = (short)(in->y + offset.y);
t++;
in++;
}
XFillPolygon(Xdisplay, draw.GetDrawable(), draw.GetGC(), out_points, n, Nonconvex, CoordModeOrigin);
}
}
Mirek
[Updated on: Wed, 16 April 2008 14:17] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Wed May 01 11:17:45 CEST 2024
Total time taken to generate the page: 0.03721 seconds
|