IImageMask

All Implemented Interfaces: com.aspose.ms.System.ICloneable

public interface IImageMask extends System.ICloneable

Describes a mask.

Methods

MethodDescription
getSource()Gets the source image used to create this mask, if exists.
getWidth()Gets the width, in pixels, of this mask.
getHeight()Gets the height, in pixels, of this mask.
getBounds()Gets the bounds, in pixels, of this mask.
getSelectionBounds()Gets the bounds of the selected part of the mask, in pixels.
isOpaque(int x, int y)Checks if the specified pixel is opaque.
isTransparent(int x, int y)Checks if the specified pixel is transparent.
getByteOpacity(int x, int y)Gets the opacity of the specified pixel with byte precision.

getSource()

public abstract RasterImage getSource()

Gets the source image used to create this mask, if exists.

Returns: RasterImage - the source image used to create this mask, if exists.

getWidth()

public abstract int getWidth()

Gets the width, in pixels, of this mask.

Returns: int - the width, in pixels, of this mask.

getHeight()

public abstract int getHeight()

Gets the height, in pixels, of this mask.

Returns: int - the height, in pixels, of this mask.

getBounds()

public abstract Rectangle getBounds()

Gets the bounds, in pixels, of this mask.

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

getSelectionBounds()

public abstract 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.

isOpaque(int x, int y)

public abstract boolean isOpaque(int x, int y)

Checks if the specified pixel is opaque.

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.

isTransparent(int x, int y)

public abstract boolean isTransparent(int x, int y)

Checks if the specified pixel is transparent.

Parameters:

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

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

getByteOpacity(int x, int y)

public abstract byte getByteOpacity(int x, int y)

Gets the opacity of the specified pixel with byte precision.

Parameters:

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

Returns: byte - Byte value, representing the opacity of the specified pixel.