|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectzinger.wcollage.CollageMaker
public class CollageMaker
Collage image creator. Collages are created by starting with an image and merging other images with it one by one. The image object maintained throughout the process is referred to as the canvas image. Both the canvas image and the images provided for merging must be of ARGB type.
Field Summary | |
---|---|
protected java.awt.image.BufferedImage |
canvasImage
|
Constructor Summary | |
---|---|
CollageMaker(java.awt.image.BufferedImage canvasImage)
Creates an instance with the specified canvas image. |
|
CollageMaker(int width,
int height)
Creates an instance with the canvas image of specified dimensions. |
Method Summary | |
---|---|
void |
clear()
Makes canvas image completely transparent black. |
java.awt.Image |
getCanvasImage()
|
void |
mergeImage(java.awt.image.BufferedImage image)
Merges provided image onto canvas image at a random location. |
void |
mergeImage(java.awt.image.BufferedImage image,
int x,
int y)
Merges provided image onto canvas at specified location. |
void |
write(java.io.File file,
java.lang.String formatName)
Writes the canvas image into a file using specified format given as an informal name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.image.BufferedImage canvasImage
Constructor Detail |
---|
public CollageMaker(java.awt.image.BufferedImage canvasImage)
canvasImage
- must be of ARGB typepublic CollageMaker(int width, int height)
Method Detail |
---|
public void mergeImage(java.awt.image.BufferedImage image)
image
- must be of ARGB typemergeImage(java.awt.image.BufferedImage, int, int)
public void mergeImage(java.awt.image.BufferedImage image, int x, int y)
image
- must be of ARGB typex
- x-coordinate for mergingy
- y-coordinate for mergingpublic java.awt.Image getCanvasImage()
public void clear()
public void write(java.io.File file, java.lang.String formatName) throws java.io.IOException
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |