[Logo]
Forums Register Login
How do I flip/translate a GObject?
The drawEngine() method creates the object I am trying to face in the opposite direction.

If you cast your Graphics object to Graphics2D, you can use the affine transform methods.

For example, scaling by -1.0 in the x-axis might give you a mirror image.

Beware
: use the method which copies the Grahpics2D object before using affine transforms. Scale is probably all right, but you can get distortions using shear. Discard the copy after the transforms. I think the copy method is called create().

Moving to our GUIs forum, where we usually discuss such questions.
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter


This thread has been viewed 964 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 22, 2018 05:37:32.