Background on rotated text [message #1031327] |
Mon, 01 April 2013 11:12  |
Eclipse User |
|
|
|
Hi,
I have a shape which text is on the far left side rotated for an angle of -90 degrees. (See image)
I want to add background on the text as I have added on the outer shape. But whatever I do it seems that text.setAngle(-90) is preventing the graphical algorithm (text) to render the background color.
Here is the code I am trying to get it work:
final Text text = gaService.createPlainText(shape,addedCompositeState.getDisplayName());
text.setStyle(StyleUtil.getStyleForCompositeStateText(getDiagram()));
text.setHorizontalAlignment(Orientation.ALIGNMENT_RIGHT);
text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
text.setFilled(true);
text.setBackground(manageColor(IColorConstant.LIGHT_GREEN));
text.setAngle(-90);
I also have layout feature for the container shape, I tried to find the problem there, but without success.
I tried to create a rectangle behind the text, but then my direct editing feature does not work. I cannot get the focus on mouse click.
Then I tried to create the text as a child on a rectangle, but the text is not shown.
Could you please tell me, is there a possibility to add background on rotated text somehow? I've tried anything I know.
Thank you in advance.
Best Regards,
Dragan
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04318 seconds