• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scaling the Image.

 
Neeba Rebbaca
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your problem's context? A web application, Swing, anything else?
 
Neeba Rebbaca
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a swing Applet. Embedded in html
 
Rob Spoor
Sheriff
Pie
Posts: 20514
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some advice on how, and when, and why, to avoid getScaledInstance: The Perils of Image.getScaledInstance()
 
Neeba Rebbaca
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic