Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java2D : applying rotation on mouse click to rendered graphics on screen  RSS feed

Akhil Jain
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI guys,
Need your help here,
I have created a structure using Java2D API and wanna apply the Rotation, Zooming and translation facility using Mouse.

The structure i have created is painted in steps. like i am drawing few points on the coordinate system , then joining them (lots of calculations for plotting it ...uffff). like connecting few points and creating some sort of strcuture. now i want to apply mouse listeners so that user can interactively rotate the complete structure.

Please help me with some example. which i can refer to...I read about Affine Transform but could able to achieve it on a complete structure... like i got an example from internet of doing transform using mouse on certain shapes....but mine is a shape comprising of many shapes...(basically...some points, some texts and some lines......forming a complete structure.)

Akhil Jain
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!