Results 1 to 5 of 5
Thread: Image Drawing
- 02-11-2011, 08:58 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 27
- Rep Power
- 0
Image Drawing
Hello,
I am trying to follow a tutorial given by Oracle found here and having some difficulties.
I copied the entire code, found here, and it worked fine with the given image.
The problem is if I give it a new larger image it only shows the top left corner that was the same size as the given image. The getHeight and getWidth methods are returning the correct values and the drawImage method is being the right values as well.
I can seem to figure out why its doing this. BTW the window appears at the correct size but only the top corner is being drawn.
Any help would be very appreciated.
- 02-11-2011, 09:03 PM #2
Member
- Join Date
- Feb 2011
- Posts
- 27
- Rep Power
- 0
Just figured it out! Im using Eclipse and under properties it was given inputs of 200 x 200.
I just need to figure out how to make this dynamic based on the image.
-
Since you're doing this in an applet, I believe that the size of the applet is determined in the HTML code -- though I may be wrong as I'm no applet expert!
- 02-11-2011, 09:09 PM #4
Member
- Join Date
- Feb 2011
- Posts
- 27
- Rep Power
- 0
I'm very new to this, but I'm not running this through html at all.
I don't even know if I know the difference between an applet and an application.
I'm inferring that an applet is on a web page and the other is not.
-
Similar Threads
-
Image data pre drawing
By trishtren in forum Java 2DReplies: 1Last Post: 02-10-2011, 08:17 PM -
Problems drawing a section of an image onto another image.
By Cain in forum Java 2DReplies: 1Last Post: 04-17-2009, 12:44 AM -
Drawing a shape on an image
By Yoruichi in forum Java 2DReplies: 2Last Post: 03-29-2009, 02:49 PM -
Drawing on an image
By kratra in forum New To JavaReplies: 0Last Post: 02-06-2009, 08:58 PM -
drawing an image to an offscreen image
By hunterbdb in forum Java 2DReplies: 9Last Post: 10-30-2008, 06:17 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks