IImageMask
All Implemented Interfaces: com.aspose.ms.System.ICloneable
public interface IImageMask extends System.ICloneable
描述掩码。
方法
| 方法 | 描述 |
|---|---|
| getSource() | 获取用于创建此掩码的源图像(如果存在)。 |
| getWidth() | 获取此掩码的宽度(以像素为单位)。 |
| getHeight() | 获取此掩码的高度(以像素为单位)。 |
| getBounds() | 获取此掩码的边界(以像素为单位)。 |
| getSelectionBounds() | 获取掩码选定部分的边界(以像素为单位)。 |
| isOpaque(int x, int y) | 检查指定像素是否不透明。 |
| isTransparent(int x, int y) | 检查指定像素是否透明。 |
| getByteOpacity(int x, int y) | 获取指定像素的透明度,精确到字节。 |
getSource()
public abstract RasterImage getSource()
获取用于创建此掩码的源图像(如果存在)。
Returns: RasterImage - the source image used to create this mask, if exists.
getWidth()
public abstract int getWidth()
获取此掩码的宽度(以像素为单位)。
Returns: int - 此掩码的宽度(以像素为单位)。
getHeight()
public abstract int getHeight()
获取此掩码的高度(以像素为单位)。
Returns: int - 此掩码的高度(以像素为单位)。
getBounds()
public abstract Rectangle getBounds()
获取此掩码的边界(以像素为单位)。
Returns: Rectangle - the bounds, in pixels, of this mask.
getSelectionBounds()
public abstract Rectangle getSelectionBounds()
获取掩码选定部分的边界(以像素为单位)。
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)
检查指定像素是否不透明。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
Returns: boolean - 如果指定像素不透明则为 true;否则为 false。
isTransparent(int x, int y)
public abstract boolean isTransparent(int x, int y)
检查指定像素是否透明。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
Returns: boolean - 如果指定像素透明则为 true;否则为 false。
getByteOpacity(int x, int y)
public abstract byte getByteOpacity(int x, int y)
获取指定像素的透明度,精确到字节。
Parameters:
| 参数 | 类型 | 描述 |
|---|---|---|
| x | int | 像素的 x 坐标。 |
| y | int | 像素的 y 坐标。 |
Returns: byte - 字节值,表示指定像素的透明度。