Qt-interest Archive, June 2007
Drawing degenerate QCanvasPolygon not working [Qt 3.3]
Message 1 in thread
Hi,
I have subclassed the QCanvasPolygon class and reimplemented the drawShape
function in order to draw polygons with outlines (QCanvasPolygon class
doesn't allows outlines for polygons).
class MyPolygon: public QCanvasPolygon
{
....
void drawShape(QPainter &){...}
};
The drawShape in MyPolygon is working and I can see an outline for polygons
that are in the canvas view.
The problem is that *if a polygon is degenerate*, that is if all verteces of
the polygon are on a straight line (this implies that the area of the
polygon is null), *the drawShape of the polygon is not called* when I update
the canvas, so the polygon is not drawn.
Thanks in advance for your help!