Title: Mosaic Image
Description: the information of a mosaic image
Constructor Detail |
public Mosaic(PicPixels[] subPieces, PicPixels Original, int divW, int divH)
subPieces
- PicPixels[] the mosaic piecesOriginal
- PicPixels the mosaic picturedivW
- int the divions widedivH
- int the divions highMethod Detail |
public int getWidth()
public int getSubWidth()
public int getHeight()
public int getSubHeight()
public void resizeMosaic(int maxWidth, int maxHeight, Frame windowCameFrom)
maxWidth
- intmaxHeight
- intwindowCameFrom
- Frameprivate void drawPieces(PicPixels picPixels, int w, int h)
picPixels
- PicPixels the mosiac piecesw
- int the width of the sector to be drawh
- int the height of the sector to be drawMosaicPicture
- BufferedImage the image to be draw toprivate void drawPieces(PicPixels Original, PicPixels picPixels, int w, int h, BufferedImage MosaicPicture)
Original
- PicPixels the mosiac imagepicPixels
- PicPixels the mosaic piecew
- int the width of the mosiac sectionh
- int the heigth of the mosaic sectionMosaicPicture
- BufferedImage the image to be draw toprivate Color findColor(Color colorpiece, Color colorOriginal)
colorpiece
- Color the color of the mosaic piece pixelcolorOriginal
- Color the color of the mosaic image pixelpublic void createMosaicPicture(double backgroundIntensity, Frame windowCameFrom)
backgroundIntensity
- double the blending levelwindowCameFrom
- Frame what window called this functionpublic BufferedImage createMosaicPicture(int width, int height, double backgroundIntensity, Frame windowCameFrom)
width
- int the width of the mosaic wanted to be createdheight
- int the height of the mosaic wanted to be createdbackgroundIntensity
- double the blending levelwindowCameFrom
- Frame the window that called this function