EmptyImageMask

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

public class EmptyImageMask extends ImageMask

描述空的非抽象掩码。

构造函数

构造函数描述
EmptyImageMask(int width, int height)使用指定的宽度和高度初始化 EmptyImageMask 类的新实例。

方法

方法描述
getSelectionBounds()获取掩码选定部分的边界(以像素为单位)。
get_Item(int x, int y)获取指定像素的透明度。
inflate(int size)按指定量膨胀此掩码。
crop(Rectangle rectangle)使用指定的矩形裁剪掩码。
deepClone()创建一个新对象,该对象是当前实例的副本。

EmptyImageMask(int width, int height)

public EmptyImageMask(int width, int height)

使用指定的宽度和高度初始化 EmptyImageMask 类的新实例。

Parameters:

参数类型描述
宽度int掩码的宽度。
高度int掩码的高度。

getSelectionBounds()

public Rectangle getSelectionBounds()

获取掩码选定部分的边界(以像素为单位)。

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)

获取指定像素的透明度。

Parameters:

参数类型描述
xint像素的 x 坐标。
yint像素的 y 坐标。

Returns: boolean - 如果指定像素不透明则为 true;否则为 false。

inflate(int size)

public ImageMask inflate(int size)

按指定量膨胀此掩码。

Parameters:

参数类型描述
大小int用于膨胀此掩码的量。

Returns: ImageMask - An inflated EmptyImageMask as ImageMask.

crop(Rectangle rectangle)

public ImageMask crop(Rectangle rectangle)

使用指定的矩形裁剪掩码。

Parameters:

参数类型描述
rectangleRectangle指定的矩形。

Returns: ImageMask - A cropped EmptyImageMask as ImageMask.

deepClone()

public Object deepClone()

创建一个新对象,该对象是当前实例的副本。

Returns: java.lang.Object - 此实例的副本的新对象。