LayerMaskData
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Cloneable
public abstract class LayerMaskData implements Cloneable
Defines base LayerMaskData class which contains information about the layer mask data in the PSD file. It can help to modify Adobe\ufffd Photoshop\ufffd files programmatically and automate PSD format editing. If the layer has only a raster mask the ImageData contains the raster mask data bytes. If the layer has only a vector mask the ImageData contains the vector mask rasterized (cached) data bytes. If the layer has both layer and vector masks the ImageData contains the raster mask and the rasterized vector mask combined. The ImageData (getImageData/setImageData(byte[])) bytes length should be equal Width * Height of MaskRectangle (getMaskRectangle/setMaskRectangle(Rectangle)) properties. Notice, that just removing / adding / updating the LayerMaskData is not enough for correct saving because channels are not updated; though it may provide correct rendering. The Layer.addLayerMask(LayerMaskData) method should be used for that.
Methods
Method | Description |
---|---|
deepClone_internalized(LayerMaskData mask) | Clones the layer mask. |
equals(Object arg0) | |
getBottom() | Gets or sets the bottom layer mask position. |
getClass() | |
getDataSize() | Gets the size of the layer mask mask data. |
getDefaultColor() | Gets or sets the default color. |
getFlags() | Gets or sets the layer mask flags. |
getHeight_internalized() | Gets the mask height. |
getImageData() | Gets or sets the layer mask data (or combined / final mask if there is a vector mask) in the PSD file. |
getLeft() | Gets or sets the left layer mask position. |
getMaskRectangle() | Gets or sets the mask Rectangle of the layer mask in the PSD file. |
getRight() | Gets or sets the right layer mask position. |
getTop() | Gets or sets the top layer mask position. |
getWidth_internalized() | Gets the mask width. |
hashCode() | |
notify() | |
notifyAll() | |
save_internalized(StreamContainer streamContainer) | Saves LayerMaskData to the specified StreamContainer . |
setBottom(int value) | Gets or sets the bottom layer mask position. |
setDefaultColor(byte value) | Gets or sets the default color. |
setFlags(byte value) | Gets or sets the layer mask flags. |
setImageData(byte[] value) | Gets or sets the layer mask data (or combined / final mask if there is a vector mask) in the PSD file. |
setLeft(int value) | Gets or sets the left layer mask position. |
setMaskRectangle(Rectangle value) | Gets or sets the mask Rectangle of the layer mask in the PSD file. |
setRight(int value) | Gets or sets the right layer mask position. |
setTop(int value) | Gets or sets the top layer mask position. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
deepClone_internalized(LayerMaskData mask)
public static LayerMaskData deepClone_internalized(LayerMaskData mask)
Clones the layer mask.
Parameters:
Parameter | Type | Description |
---|---|---|
mask | LayerMaskData | The mask. |
Returns: LayerMaskData - The cloned layer mask.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getBottom()
public final int getBottom()
Gets or sets the bottom layer mask position.
Value: The bottom layer mask position.
Returns: int
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getDataSize()
public final int getDataSize()
Gets the size of the layer mask mask data.
Value: The size of the layer mask mask data.
Returns: int
getDefaultColor()
public final byte getDefaultColor()
Gets or sets the default color.
Value: The default color.
Returns: byte
getFlags()
public final byte getFlags()
Gets or sets the layer mask flags.
Value: The layer mask flags.
Returns: byte
getHeight_internalized()
public final int getHeight_internalized()
Gets the mask height.
Value: The height.
Returns: int
getImageData()
public final byte[] getImageData()
Gets or sets the layer mask data (or combined / final mask if there is a vector mask) in the PSD file.
Value: The image data.
Returns: byte[]
getLeft()
public final int getLeft()
Gets or sets the left layer mask position.
Value: The left layer mask position.
Returns: int
getMaskRectangle()
public final Rectangle getMaskRectangle()
Gets or sets the mask Rectangle of the layer mask in the PSD file. It takes left, right, top and bottom properties and creates Rectangle
Value: The mask rectangle.
Returns: Rectangle
getRight()
public final int getRight()
Gets or sets the right layer mask position.
Value: The right layer mask position.
Returns: int
getTop()
public final int getTop()
Gets or sets the top layer mask position.
Value: The top layer mask position.
Returns: int
getWidth_internalized()
public final int getWidth_internalized()
Gets the mask width.
Value: The width.
Returns: int
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
save_internalized(StreamContainer streamContainer)
public abstract void save_internalized(StreamContainer streamContainer)
Saves LayerMaskData to the specified StreamContainer .
Parameters:
Parameter | Type | Description |
---|---|---|
streamContainer | StreamContainer | The stream container to save data to. |
setBottom(int value)
public final void setBottom(int value)
Gets or sets the bottom layer mask position.
Value: The bottom layer mask position.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setDefaultColor(byte value)
public final void setDefaultColor(byte value)
Gets or sets the default color.
Value: The default color.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte |
setFlags(byte value)
public final void setFlags(byte value)
Gets or sets the layer mask flags.
Value: The layer mask flags.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte |
setImageData(byte[] value)
public final void setImageData(byte[] value)
Gets or sets the layer mask data (or combined / final mask if there is a vector mask) in the PSD file.
Value: The image data.
Parameters:
Parameter | Type | Description |
---|---|---|
value | byte[] |
setLeft(int value)
public final void setLeft(int value)
Gets or sets the left layer mask position.
Value: The left layer mask position.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setMaskRectangle(Rectangle value)
public final void setMaskRectangle(Rectangle value)
Gets or sets the mask Rectangle of the layer mask in the PSD file. It takes left, right, top and bottom properties and creates Rectangle
Value: The mask rectangle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Rectangle |
setRight(int value)
public final void setRight(int value)
Gets or sets the right layer mask position.
Value: The right layer mask position.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setTop(int value)
public final void setTop(int value)
Gets or sets the top layer mask position.
Value: The top layer mask position.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |