aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Scaling the Image. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Scaling the Image." Watch "Scaling the Image." New topic
Author

Scaling the Image.

Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 136
I'm using a wider co-ordinates so quite often, my images are going out of my screen. Is there any method so, that i can display the image always in viewable area.???


Thank You
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

What is your problem's context? A web application, Swing, anything else?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 136
Its a swing Applet. Embedded in html
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Image has a method called getScaledInstance. You can get the viewable area by getting the JViewport of a JScrollPane; check out its methods.

Moving to Swing.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39549
    
  27
Some advice on how, and when, and why, to avoid getScaledInstance: The Perils of Image.getScaledInstance()


Ping & DNS - updated with new look and Ping home screen widget
Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 136
i think its more related to java 3d.

Let me explain the scenario. suppose i want to draw a line,whose co-ordinate are 11123.256(its from GPS co-ordinate).So how can i display such a huge scale.(Moreover, i don't want to scroll). I just want to show the diagram in the viewable area.


I have one more question.What is the Maximum and minimum co-ordinate that java 3d will support???

Thank you.
Neeba Rebbaca
Ranch Hand

Joined: Oct 21, 2008
Posts: 136
I need to draw line for coordinate -157,-132,31(Natural Coordinates). But its not displaying in the screen. How to bring it inside the view???




Please help me!!!

Thank you...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scaling the Image.
 
Similar Threads
Image problem
Can we resize the image in j2me
Move enlarged image around on mouseover - Image mapping
is it necessary to use .png file format for images?
how to save images