This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
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

Image Coordinates and Scaling  RSS feed

 
Vincent Cas
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm creating and saving a BufferedImage with width and height 765. I'm then applying an scale AffineTransform of 3 on each axis.

Then I'm attempting to draw a rectangle with x1, y1, coordiantes of 3, which scales to 9, and x2, y2 coordinates of 252, which scales to 756. However, the rectangle always seems to overlap the bottom right corner of the image and I have no idea why.

Does anyone have any suggestions as to what I might be doing wrong?

Thanks for your time,
 
Vincent Cas
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code i'm using.

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!