Home arrow static arrow Java Programming [Archive] - Imported Picture Clip
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Imported Picture Clip
This topic has 1 reply on 1 page.

Posts:112
Registered: 10/8/03
Imported Picture Clip  
Jul 7, 2004 8:23 AM



 
Hi,

I have a whole lot of images of different views of the same object that I am importing into my program. I want to make it so I just import 1 image and then only show parts of it or divide it into many pics. Can someone point me in the right direction of how to do this?
 

Posts:10,972
Registered: 10/23/03
Re: Imported Picture Clip  
Jul 7, 2004 10:23 AM (reply 1 of 1)



 
1. Drawing with the appropriate clipping installed on you graphics object, through [url=http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html#setClip(int,%20int,%20int,%20int)]setClip[/url], [url=http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html#setClip(java.awt.Shape)]setClip[/url], [url=http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html#clipRect(int,%20int,%20int,%20int)]clipRect[/url] or [url=http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics2D.html#clip(java.awt.Shape)]clip[/url].
2. BufferedImage's [url=http://java.sun.com/j2se/1.5.0/docs/api/java/awt/image/BufferedImage.html#getSubimage(int,%20int,%20int,%20int)]getSubimage[/url]
3. Some versions of Image's drawImage method only draw part of an image, for example [url=http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Graphics.html#drawImage(java.awt.Image,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20java.awt.image.ImageObserver)]drawImage[/url].
 
This topic has 1 reply on 1 page.