rotate a picture around it's center

后端 未结 1 1549
渐次进展
渐次进展 2021-01-24 08:20

Is there an easy way to rotate a picture around it\'s center? I used an AffineTransformOp first. It seems simple and need and finding the right parameters for a matrix should be

相关标签:
1条回答
  • 2021-01-24 08:53

    If I understand your question correctly, you can translate to the origin, rotate, and translate back, as shown in this example.

    As you are using AffineTransformOp, this example may be more apropos. In particular, note the last-specified-first-applied order in which operations are concatenated; they are not commutative.

    0 讨论(0)
提交回复
热议问题