Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » DrawPolygon in Report
|
|
Re: DrawPolygon in Report [message #6940 is a reply to message #6939] |
Tue, 05 December 2006 15:08   |
andrei-catalin
Messages: 62 Registered: May 2006 Location: Romania
|
Member |
|
|
A simple testcase (in Reference/Report):
Vector<Point> poly;
poly<<Point(200,200)<<Point(700,200)<<Point(700,500)<<Point(200,500)<<Point(200,200);
r.DrawPolygon(poly,Cyan,2,Red,0,Null);
Andrei
|
|
|
Re: DrawPolygon in Report [message #6948 is a reply to message #6940] |
Tue, 05 December 2006 17:19   |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
Thanks, fixed.
Quick patch:
Draw/Drawing.cpp 420
static void wsDrawPolyPolyPolygon(Draw& w, Stream& stream, const DrawingPos& dp)
{
Color color, outline, doxor;
uint64 pattern;
int width, vertex_count, subpolygon_count_count, disjunct_polygon_count_count;
int version = 2;
stream / version;
stream % color % width % outline % pattern % doxor;
stream % vertex_count % subpolygon_count_count % disjunct_polygon_count_count;
Buffer<Point> vertices(vertex_count);
Buffer<int> subpolygon_counts(subpolygon_count_count);
Buffer<int> disjunct_polygon_counts(disjunct_polygon_count_count);
StreamUnpackPoints(stream, vertices, vertex_count);
StreamUnpackInts(stream, subpolygon_counts, subpolygon_count_count);
StreamUnpackInts(stream, disjunct_polygon_counts, disjunct_polygon_count_count);
if(!dp.Identity()) {
for(Point *p = vertices, *e = p + vertex_count; p < e; p++)
dp.Transform(*p);
dp.TransformW(width);
}
w.DrawPolyPolyPolygon(vertices, vertex_count,
subpolygon_counts, subpolygon_count_count,
disjunct_polygon_counts, disjunct_polygon_count_count,
color, width, outline, pattern, doxor);
}
Mirek
|
|
|
|
Goto Forum:
Current Time: Wed Apr 30 14:39:43 CEST 2025
Total time taken to generate the page: 0.05933 seconds
|