|
-
Mar 16th, 2008, 08:44 PM
#1
Graphics.drawImage
In the following code line what is 0 and -60 refering to?
Is it the X and Y that the image is to be drawn at in the Graphics object g or is it the X and Y of the image offscreenImg to be extracted and drawn at 0, 0 in the object g?
Code:
'
'
g.drawImage(offscreenImg, 0, -60, this);
'
'
-
Mar 17th, 2008, 07:12 AM
#2
Re: Graphics.drawImage
X & Y of the clip the graphics object is drawing
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Mar 17th, 2008, 07:43 AM
#3
Re: Graphics.drawImage
So drawImage(image, 20, 20, this); will clip the image at 20, 20 and draw it on a Graphics object at 0, 0?
-
Mar 17th, 2008, 08:00 AM
#4
Re: Graphics.drawImage
The image is drawn with its top-left corner at (x, y) in this graphics context's coordinate space
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Mar 17th, 2008, 08:55 AM
#5
Re: Graphics.drawImage
Oh, just the opposite then of what I said above.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|