Catalano.Imaging.Filters
Class Crop
- java.lang.Object
-
- Catalano.Imaging.Filters.Crop
-
- All Implemented Interfaces:
- IApply, IApplyInPlace
public class Crop extends java.lang.Object implements IApply, IApplyInPlace
Crop an image.The filter crops an image providing a new image, which contains only the specified rectangle of the original image.
- Supported types: Grayscale, RGB.
- Coordinate System: Matrix.
-
-
Constructor Summary
Constructors Constructor and Description Crop(int x, int y, int width, int height)Initialize a new instance of the Crop class.Crop(IntRectangle rectangle)Initialize a new instance of the Crop class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description FastBitmapapply(FastBitmap fastBitmap)Apply the filtervoidapplyInPlace(FastBitmap fastBitmap)Apply filter to a FastBitmap.intgetHeight()intgetWidth()Get Width.intgetX()Get Initial X axis coordinate.intgetY()Get Initial Y axis coordinate.voidsetHeight(int height)Set Height.voidsetPosition(int x, int y)Set Initial X and Y axis coordinate.voidsetSize(int height, int width)Set Width and Height.voidsetWidth(int width)Set Width.voidsetX(int x)Set Initial X axis coordinate.voidsetY(int y)Set Initial Y axis coordinate.
-
-
-
Constructor Detail
-
Crop
public Crop(IntRectangle rectangle)
Initialize a new instance of the Crop class.- Parameters:
rectangle- Rectangle.
-
Crop
public Crop(int x, int y, int width, int height)Initialize a new instance of the Crop class.- Parameters:
x- start x position.y- start y position.width- new width.height- new height.
-
-
Method Detail
-
getX
public int getX()
Get Initial X axis coordinate.- Returns:
- X axis coordinate.
-
setX
public void setX(int x)
Set Initial X axis coordinate.- Parameters:
x- X axis coordinate.
-
getY
public int getY()
Get Initial Y axis coordinate.- Returns:
- Y axis coordinate.
-
setY
public void setY(int y)
Set Initial Y axis coordinate.- Parameters:
y- Y axis coordinate.
-
setPosition
public void setPosition(int x, int y)Set Initial X and Y axis coordinate.- Parameters:
x- X axis coordinate.y- Y axis coordinate.
-
getHeight
public int getHeight()
-
setHeight
public void setHeight(int height)
Set Height.- Parameters:
height- Height.
-
getWidth
public int getWidth()
Get Width.- Returns:
- Width.
-
setWidth
public void setWidth(int width)
Set Width.- Parameters:
width- Width.
-
setSize
public void setSize(int height, int width)Set Width and Height.- Parameters:
height- Height.width- Width.
-
apply
public FastBitmap apply(FastBitmap fastBitmap)
Description copied from interface:IApplyApply the filter
-
applyInPlace
public void applyInPlace(FastBitmap fastBitmap)
Apply filter to a FastBitmap.- Specified by:
applyInPlacein interfaceIApplyInPlace- Parameters:
fastBitmap- FastBitmap
-
-
DataMelt 3.0 © DataMelt by jWork.ORG