Gridarta Editor
net.sf.gridarta.utils.ImageUtils Class Reference

Utility class for image related functions. More...

+ Collaboration diagram for net.sf.gridarta.utils.ImageUtils:

Static Public Member Functions

static Image scaleImage (@NotNull final Image image, final int w, final int h) throws InterruptedException
 Returns a scaled version of an Image. More...
 

Private Member Functions

 ImageUtils ()
 Private constructor to prevent instantiation. More...
 

Static Private Attributes

static final Component COMPONENT
 The component for the media TRACKER. More...
 
static final MediaTracker TRACKER = new MediaTracker(COMPONENT)
 The MediaTracker for loading scaled images. More...
 

Detailed Description

Utility class for image related functions.

Author
Andreas Kirschbaum

Definition at line 31 of file ImageUtils.java.

Constructor & Destructor Documentation

◆ ImageUtils()

net.sf.gridarta.utils.ImageUtils.ImageUtils ( )
private

Private constructor to prevent instantiation.

Definition at line 53 of file ImageUtils.java.

Member Function Documentation

◆ scaleImage()

static Image net.sf.gridarta.utils.ImageUtils.scaleImage ( @NotNull final Image  image,
final int  w,
final int  h 
) throws InterruptedException
static

Returns a scaled version of an Image.

Other than Image#getScaledInstance(int, int, int), this function drops the reference to the source image.

Parameters
imagethe source image to scale
wthe scaled width
hthe scaled height
Returns
the scaled image
Exceptions
InterruptedExceptionif scaling failed because the current thread was interrupted

Definition at line 68 of file ImageUtils.java.

Referenced by net.sf.gridarta.gui.mapimagecache.MapImageCacheEntry.scaleImage().

+ Here is the caller graph for this function:

Member Data Documentation

◆ COMPONENT

final Component net.sf.gridarta.utils.ImageUtils.COMPONENT
staticprivate
Initial value:
= new Component() {
private static final long serialVersionUID = 1L;
}

The component for the media TRACKER.

Definition at line 36 of file ImageUtils.java.

◆ TRACKER

final MediaTracker net.sf.gridarta.utils.ImageUtils.TRACKER = new MediaTracker(COMPONENT)
staticprivate

The MediaTracker for loading scaled images.

Definition at line 48 of file ImageUtils.java.


The documentation for this class was generated from the following file: