Class Library: rotate vector drawing around defined point

  • Replies:2
  • OpenNot stickiedUnanswered
  • Forum posts: 15

May 19, 2016 6:33:48 PM via Website

Is there any Java library for rotating an array of lines (start and endpoints) around a fixed rotation point? I can do it for a simple drawing but it is so much complicated calculus. If someone has already written this 2d graphics rotation library I am going to use it.

Is it called an affine transform? Is there some more theoretically simple mathematical method to do this?

  • Forum posts: 256

May 19, 2016 7:05:50 PM via Website

It is easy to use the Path class, add to Path all of the lines and call Path.rotate(x, y, angle), where x,y is the center of rotation.

  • Forum posts: 15

May 19, 2016 10:58:50 PM via Website

Thank god for the Path class.