public class ImageBitMask extends ImageMask
Describes a binary image mask.
| Constructor and Description |
|---|
ImageBitMask(int width,
int height)
Initializes a new instance of the
ImageBitMask class with the specified width and height. |
ImageBitMask(RasterImage image)
Initializes a new instance of the
ImageBitMask class with the size of the specified existing RasterImage. |
| Modifier and Type | Method and Description |
|---|---|
ImageMask |
crop(Rectangle rectangle)
Crops mask with the specified rectangle.
|
Object |
deepClone()
Creates a new object that is a copy of the current instance.
|
boolean |
get_Item(int x,
int y)
Gets the opacity of the specified pixel.
|
Rectangle |
getSelectionBounds()
Gets the bounds of the selected part of the mask, in pixels.
|
ImageMask |
inflate(int size)
Inflates this mask by the specified amount.
|
static ImageBitMask |
op_Addition(ImageBitMask a,
ImageBitMask b)
Union of two masks.
|
static ImageBitMask |
op_ExclusiveOr(ImageBitMask a,
ImageBitMask b)
Exclusive disjunction of two masks.
|
static ImageBitMask |
op_LogicalNot(ImageBitMask a)
Inverts mask.
|
static ImageBitMask |
op_Multiply(ImageBitMask a,
ImageBitMask b)
Intersection of two masks.
|
static ImageBitMask |
op_Subtraction(ImageBitMask a,
ImageBitMask b)
Subtract second mask from first.
|
void |
setMaskPixel(int x,
int y,
boolean value)
Sets the opacity to the specified pixel.
|
apply, applyTo, crop, crop, exclusiveDisjunction, exclusiveDisjunction, exclusiveDisjunction, exclusiveDisjunction, exclusiveDisjunction, getBounds, getByteOpacity, getFeathered, getFeathered, getHeight, getSource, getWidth, intersect, intersect, intersect, intersect, intersect, invert, isOpaque, isTransparent, op_Addition, op_ExclusiveOr, op_LogicalNot, op_Multiply, op_Subtraction, subtract, subtract, subtract, subtract, subtract, to_ImageGrayscaleMask, union, union, union, union, unionpublic ImageBitMask(int width,
int height)
Initializes a new instance of the ImageBitMask class with the specified width and height.
width - Width of the mask.height - Height of the mask.public ImageBitMask(RasterImage image)
Initializes a new instance of the ImageBitMask class with the size of the specified existing RasterImage.
Specified RasterImage will be stored as source image.
image - Source image.public Rectangle getSelectionBounds()
Gets the bounds of the selected part of the mask, in pixels.
public boolean get_Item(int x,
int y)
Gets the opacity of the specified pixel.
public ImageMask inflate(int size)
Inflates this mask by the specified amount.
inflate in class ImageMasksize - The amount to inflate this mask.ImageBitMask as ImageMask.public ImageMask crop(Rectangle rectangle)
Crops mask with the specified rectangle.
crop in class ImageMaskrectangle - The specified rectangle.ImageBitMask as ImageMask.public Object deepClone()
Creates a new object that is a copy of the current instance.
public final void setMaskPixel(int x,
int y,
boolean value)
Sets the opacity to the specified pixel.
x - The x-coordinate of the pixel.y - The y-coordinate of the pixel.value - true if the specified pixel is opaque; otherwise, false.public static ImageBitMask op_LogicalNot(ImageBitMask a)
Inverts mask.
a - The mask to be inverted.ImageBitMask.public static ImageBitMask op_Addition(ImageBitMask a, ImageBitMask b)
Union of two masks.
a - The first mask.b - The second mask.ImageBitMask.public static ImageBitMask op_Subtraction(ImageBitMask a, ImageBitMask b)
Subtract second mask from first.
a - The first mask.b - The second mask.ImageBitMask.public static ImageBitMask op_Multiply(ImageBitMask a, ImageBitMask b)
Intersection of two masks.
a - The first mask.b - The second mask.ImageBitMask.public static ImageBitMask op_ExclusiveOr(ImageBitMask a, ImageBitMask b)
Exclusive disjunction of two masks.
a - The first mask.b - The second mask.ImageBitMask.Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.