[GEF]Call rotate in paintFigure but moveHandle isn't rotated [message #1780644] |
Thu, 25 January 2018 09:05 |
lee lucky Messages: 26 Registered: October 2017 |
Junior Member |
|
|
Hi guys,
Recently, I am researching how to rotate a label in GEF.
And I have rotated it by calling graphics.rotate in #paintFigure(Graphics graphics), but the move handle and the eight resize handles are still at the old positions. The codes are like that:
@Override
public void paintFigure(Graphics graphics){
.......
int rotate_x = 10;// for example
int rotate_y = 10;// for example
graphics.translate(rotate_x, rotate_y);
graphics.rotate(90);
paintText();
graphics.translate(-rotate_x, -rotate_y);
.......
}
As the position and size has been changed because of rotation, so where should I change to the new position and size in the label's editpart?
I have tried several ways,like refresh, refreshBounds, refreshVisuals, repaint without success.
Could you guys give me some suggestions? Any help is greatful.
Thanks in advance.
[Updated on: Wed, 07 February 2018 03:09] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.02135 seconds