|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.resources.Resource
net.sf.freecol.common.resources.ImageResource
public class ImageResource
A Resource
wrapping an Image
.
Resource
Method Summary | |
---|---|
java.awt.Image |
getGrayscaleImage(java.awt.Dimension d)
Gets a grayscale version of the image of the given size. |
java.awt.Image |
getGrayscaleImage(double scale)
Returns the image using the specified scale. |
java.awt.Image |
getImage()
Gets the Image represented by this resource. |
java.awt.Image |
getImage(java.awt.Dimension d)
Returns the image using the specified dimension. |
java.awt.Image |
getImage(double scale)
Returns the image using the specified scale. |
Methods inherited from class net.sf.freecol.common.resources.Resource |
---|
getResourceLocator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.awt.Image getImage()
Image
represented by this resource.
public java.awt.Image getImage(double scale)
scale
- The size of the requested image (with 1 being normal size,
2 twice the size, 0.5 half the size etc). Rescaling
will be performed unless using 1.
Image
.public java.awt.Image getImage(java.awt.Dimension d)
d
- The dimension of the requested image. Rescaling
will be performed if necessary.
Image
.public java.awt.Image getGrayscaleImage(java.awt.Dimension d)
d
- The requested size.
Image
.public java.awt.Image getGrayscaleImage(double scale)
scale
- The size of the requested image (with 1 being normal size,
2 twice the size, 0.5 half the size etc). Rescaling
will be performed unless using 1.
Image
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |