EmptyImageMask

Inheritance: java.lang.Object, com.aspose.imaging.magicwand.imagemasks.ImageMask

public class EmptyImageMask extends ImageMask

Describes an empty non-abstract mask.

Constructors

ConstructorDescription
EmptyImageMask(int width, int height)Initializes a new instance of the EmptyImageMask class with the specified width and height.

Methods

MethodDescription
getSelectionBounds()Gets the bounds of the selected part of the mask, in pixels.
get_Item(int x, int y)Gets the opacity of the specified pixel.
inflate(int size)Inflates this mask by the specified amount.
crop(Rectangle rectangle)Crops mask with the specified rectangle.
deepClone()Creates a new object that is a copy of the current instance.

EmptyImageMask(int width, int height)

public EmptyImageMask(int width, int height)

Initializes a new instance of the EmptyImageMask class with the specified width and height.

Parameters:

ParameterTypeDescription
widthintWidth of the mask.
heightintHeight of the mask.

getSelectionBounds()

public Rectangle getSelectionBounds()

Gets the bounds of the selected part of the mask, in pixels.

Returns: Rectangle - the bounds of the selected part of the mask, in pixels.

get_Item(int x, int y)

public boolean get_Item(int x, int y)

Gets the opacity of the specified pixel.

Parameters:

ParameterTypeDescription
xintThe x-coordinate of the pixel.
yintThe y-coordinate of the pixel.

Returns: boolean - true if the specified pixel is opaque; otherwise, false.

inflate(int size)

public ImageMask inflate(int size)

Inflates this mask by the specified amount.

Parameters:

ParameterTypeDescription
sizeintThe amount to inflate this mask.

Returns: ImageMask - An inflated EmptyImageMask as ImageMask.

crop(Rectangle rectangle)

public ImageMask crop(Rectangle rectangle)

Crops mask with the specified rectangle.

Parameters:

ParameterTypeDescription
rectangleRectangleThe specified rectangle.

Returns: ImageMask - A cropped EmptyImageMask as ImageMask.

deepClone()

public Object deepClone()

Creates a new object that is a copy of the current instance.

Returns: java.lang.Object - A new object that is a copy of this instance.