com.mebigfatguy.polycasso
Interface ImageGenerator

All Known Implementing Classes:
DefaultImageGenerator

public interface ImageGenerator

interface that generates test images iteratively looking for the best image that matches a target.


Method Summary
 void addImageGeneratedListener(ImageGeneratedListener listener)
          allows interested parties to register to receive events when a new best image has been found.
 void complete()
          completes the image by transforming the polygon image to the real image
 void fireImageGenerated(java.awt.Image image)
          informs all listeners that a new best image has been found
 PolygonData[] getBestData()
          retrieves the best set of polygons for drawing the image so far
 java.awt.Dimension getImageSize()
          returns the image size that is being generated.
 java.awt.image.BufferedImage getTargetImage()
          retrieves the scaled target iamge
 void removeImageGeneratedListener(ImageGeneratedListener listener)
          allows uninterested parties to unregister to receive events when a new best image is found
 void startGenerating()
          starts up threads to start looking for images that are closest to the target
 void stopGenerating()
          shuts down threads that were looking for images
 

Method Detail

startGenerating

void startGenerating()
starts up threads to start looking for images that are closest to the target


stopGenerating

void stopGenerating()
shuts down threads that were looking for images


getTargetImage

java.awt.image.BufferedImage getTargetImage()
retrieves the scaled target iamge

Returns:
the target image

getImageSize

java.awt.Dimension getImageSize()
returns the image size that is being generated. This size might be different the original image if the size is bigger then the max setting.

Returns:
the image size

getBestData

PolygonData[] getBestData()
retrieves the best set of polygons for drawing the image so far

Returns:
the best set of polygons

complete

void complete()
completes the image by transforming the polygon image to the real image


addImageGeneratedListener

void addImageGeneratedListener(ImageGeneratedListener listener)
allows interested parties to register to receive events when a new best image has been found.

Parameters:
listener - the listener that is interested in events

removeImageGeneratedListener

void removeImageGeneratedListener(ImageGeneratedListener listener)
allows uninterested parties to unregister to receive events when a new best image is found

Parameters:
listener - the listener that is no longer needed

fireImageGenerated

void fireImageGenerated(java.awt.Image image)
informs all listeners that a new best image has been found

Parameters:
image - the new best image


Copyright © 2009-2010 MeBigFatGuy.com. All Rights Reserved.