File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes draw image problems Canvas Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "draw image problems Canvas" Watch "draw image problems Canvas" New topic
Author

draw image problems Canvas

omar bili
Ranch Hand

Joined: Aug 13, 2004
Posts: 177
Hey Guys,
i am drawing an image inside a canvas using Graphics.drawImage(image,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,Color,imageObserver)
i am using the imageObserver as the Canvas
the canvas is 500x600, so is the applet, and the scrollPane. in short everything is 500x600
the problem i face is that when drawing the image, i set the source parameters (sx...) to the dimenstions of the original image, yet when setting the destination parameters, even if i set the x coordinate of the second point (dx2) to 800, it keeps drawing inside the canvas..how come is that happening ?
HELP !!
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
it keeps drawing inside the canvas — I don't understand what you're asking.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: draw image problems Canvas
 
Similar Threads
Printing hi-res (say, 300 dpi) images
Canvas to BufferedImage while using Bufferstrategy
Image icon problem
Drawing Image Doubles Memory Consumption
Double buffering delivered widgets