Domanda

I doing some 2D drawing in a SWT GUI. For that I have a GC Object.

How can I draw rotatet text inside of an SWT Canvas?

È stato utile?

Soluzione

This should do it:

Transform tr = new Transform(display);
tr.rotate(-90);
gc.setTransform(tr);

gc.drawText("Text", x, y);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top