Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [Draw 2d] Problem with rotation of draw2d label.(How to rotate a draw2d label?)
[Draw 2d] Problem with rotation of draw2d label. [message #756909] Tue, 15 November 2011 08:51
Meghna Missing name is currently offline Meghna Missing name
Messages: 9
Registered: March 2011
Junior Member
Hi,

I need to rotate draw2d label to align them in parallel with PolylineConnection objects.
I tried overriding the paintFigure method:

graphics.rotate(45);
super.paintFigure(graphics);


However, I observed null pointer exceptions from super.paintFigure() method.
On eclipse bugzilla, it seems that this bug have been fixed in 3.6 version of gef.
But even after trying the code on 3.7 gef version, I observed the same exception.

As the exception is due to setting of relativeClip to null value in SWTGraphics.rotate() method, I tried setting the relativeClip by calling setClip() method before calling super.paintFigure() method. There was no exception but the label did not rotate.

What are the exact steps for rotating labels using graphics.rotate()?
Is there any other way by which draw2d labels can be drawn at an angle and aligned parallel to draw2d PolylineConnection objects?

Any pointers will be extremely helpful.

Thanks.

Previous Topic:Problem with ZEST...
Next Topic:Scaled SWTGraphics draws
Goto Forum:
  


Current Time: Thu Jul 24 21:46:58 EDT 2014

Powered by FUDForum. Page generated in 0.01818 seconds