|Problem with drawing polygon using draw2d ScalablePolygonShape. [message #761401]
||Tue, 06 December 2011 12:33
| Meghna Missing name
Registered: March 2011
I have to display a polygon(basically a trapezium shape) on a
FigureCanvas. I have a class that extends org.eclipse.draw2d
ScalablePolygonShape. While creating the object of this class,
the polygon points are added using the addPoint() method:-
After creating the polygon object, I set a contraint on it with a
rectangle having bounds that encloses the polygon:-
new Rectangle(x1, y1, x2 - x1, y4 - y1);
The polygon is plotted correctly if the y position values are less,
i.e y1=300, y2=400, y3=500, y4=600, but if the y position values
are increased to say y1=10300, y2=10400, y3=10500, y4=10600,
then the polygon is plotted smaller in size & appear clipped.
Any reasons as to why this is happening?
Any pointers to resolve this problem will be greatly helpful.
Powered by FUDForum
. Page generated in 0.04252 seconds