I am doing an Eclipse plugin using gef. Does anybody knows how to draw a vertical label?
Kind Regards, Kyriakos Georgiou
I am doing an Eclipse plugin using gef. Does anybody knows how to draw a vertical label?
Kind Regards, Kyriakos Georgiou
Using ImageUtilities as in the linked post worked well. Here is how to use it in a Label.
@Override
protected void paintFigure(Graphics graphics) {
if (vertical) {
Image image = ImageUtilities.createRotatedImageOfString(getSubStringText(), getFont(), getForegroundColor(), getBackgroundColor());
graphics.drawImage(image, new Point(getTextLocation()).translate(getLocation()));
image.dispose();
} else {
super.paintFigure(graphics);
}
}