Results 1 to 5 of 5
- 08-06-2010, 08:10 AM #1
Member
- Join Date
- Aug 2009
- Posts
- 9
- Rep Power
- 0
Rotating image based on the direction of a line
Hello,
My question really has more to do with math than Java; although, I'm trying to rotate a buffered image using rotate(double theta) from Graphics2D based on the direction of point A to point B.
[Graphics2D (Java 2 Platform SE v1.4.2)
Could someone provide the equation? Also, if there's a better way of doing this, please do tell.
Thanks.
- 08-06-2010, 08:16 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,373
- Blog Entries
- 7
- Rep Power
- 17
You have to define the phrase "based on the direction of point A to point B" a bit better.
kind regards,
Jos
- 08-06-2010, 08:24 AM #3
Member
- Join Date
- Aug 2009
- Posts
- 9
- Rep Power
- 0
I created an image to illustrate what I want to do; hopefully it'll help. The box represents the image. I would like the south part of the box to be parallel with the line.
http://img831.imageshack.us/img831/7606/examplehp.png
- 08-06-2010, 08:27 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,373
- Blog Entries
- 7
- Rep Power
- 17
- 08-06-2010, 08:32 AM #5
Member
- Join Date
- Aug 2009
- Posts
- 9
- Rep Power
- 0
Similar Threads
-
Problem in rotating and moving image at the same time
By Babar in forum Java 2DReplies: 3Last Post: 06-16-2010, 10:27 PM -
Rotating an image
By lackofcolor in forum Java 2DReplies: 3Last Post: 02-27-2009, 11:54 PM -
Rotating Image?
By sciguy77 in forum Java AppletsReplies: 9Last Post: 02-17-2009, 01:47 AM -
Rotating and flipping an image in SWT
By Java Tip in forum SWTReplies: 0Last Post: 07-02-2008, 08:01 PM -
non web based image verification integration
By therock in forum AWT / SwingReplies: 1Last Post: 01-10-2008, 11:22 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks