public class ImageModel extends Object implements ImageConduit
displayImage
), and two helper buffers
(unscaledDisplayImage
, unscaledReferenceImage
).
While not ideally memory efficient design, it is an optimized model given
the tradeoff of memory usage vs. runtime performance.Constructor and Description |
---|
ImageModel() |
Modifier and Type | Method and Description |
---|---|
BufferedImage |
getImage()
Returns a BufferedImage with an applied affinetransform on it.
|
BufferedImage |
getModifiedImage() |
void |
onFilter(ImageFilterEvent ev) |
void |
onImageLoad(ImageLoadEvent ev) |
void |
onReset(ModelResetRequestEvent ev) |
void |
onRotate(RotateEvent ev) |
void |
onScale(ScaleEvent ev) |
void |
rotate(ImageTransformListener.RotateDirection direction)
Rotates the image 90 degrees left or right.
|
void |
scale(double scalePct)
Scales the image to desired percentage.
|
void |
twirl() |
public void onImageLoad(ImageLoadEvent ev) throws Exception
Exception
public void scale(double scalePct) throws ScaleViewException
scalePct
- The scale which should be applied to the image.ScaleViewException
- This exception is thrown if the scale is out
of bounds. Accepted value domain is between 0.1 to 1.0 inclusive.public void rotate(ImageTransformListener.RotateDirection direction)
direction
- - the direction in which the image is rotated.public BufferedImage getImage()
public void twirl()
public void onFilter(ImageFilterEvent ev)
public void onReset(ModelResetRequestEvent ev)
public void onRotate(RotateEvent ev)
public void onScale(ScaleEvent ev)
public BufferedImage getModifiedImage()
getModifiedImage
in interface ImageConduit
Copyright © 2012-2013 Bambi Software Foundation. All Rights Reserved.