public class PattResource extends LayerResource
Class PattResource. Resource with pattern data
LayerResource
Modifier and Type | Field and Description |
---|---|
static int |
TypeToolKey
The type tool info key.
|
PsbResourceSignature, ResourceSignature
Constructor and Description |
---|
PattResource()
Initializes a new instance of the
PattResource class. |
PattResource(byte[] bytes)
Initializes a new instance of the
PattResource class. |
Modifier and Type | Method and Description |
---|---|
short |
getHeight()
Gets the height.
|
short |
getImageMode()
Gets the image mode.
|
int |
getKey()
Gets the layer resource key.
|
int |
getLength()
Gets the layer resource length in bytes.
|
String |
getName()
Gets or sets the name.
|
int[] |
getPatternData()
Gets the pattern data.
|
String |
getPatternId()
Gets or sets the pattern identifier.
|
int |
getPatternLength()
Gets the length of the pattern.
|
int |
getPsdVersion()
Gets the psd version.
|
int |
getSignature()
Gets the layer resource signature.
|
int |
getVersion()
Gets the version.
|
short |
getWidth()
Gets the width.
|
void |
save(StreamContainer streamContainer,
int psdVersion)
Saves the resource block data.
|
void |
setHeight(short value)
Gets the height.
|
void |
setImageMode(short value)
Gets the image mode.
|
void |
setName(String value)
Gets or sets the name.
|
void |
setPattern(int[] pixels,
Rectangle bounds)
Sets the pattern.
|
void |
setPatternId(String value)
Gets or sets the pattern identifier.
|
void |
setPatternLength(int value)
Gets the length of the pattern.
|
void |
setVersion(int value)
Gets the version.
|
void |
setWidth(short value)
Gets the width.
|
toString
public static final int TypeToolKey
The type tool info key.
public PattResource()
Initializes a new instance of the PattResource
class.
public PattResource(byte[] bytes)
Initializes a new instance of the PattResource
class.
bytes
- The bytes.public final int[] getPatternData()
Gets the pattern data.
Value: The pattern data.public final String getPatternId()
Gets or sets the pattern identifier.
Value: The pattern identifier.public final void setPatternId(String value)
Gets or sets the pattern identifier.
Value: The pattern identifier.public final String getName()
Gets or sets the name.
Value: The name.public final void setName(String value)
Gets or sets the name.
Value: The name.public final short getHeight()
Gets the height.
Value: The height.public void setHeight(short value)
Gets the height.
Value: The height.public final short getWidth()
Gets the width.
Value: The width.public void setWidth(short value)
Gets the width.
Value: The width.public final short getImageMode()
Gets the image mode.
Value: The image mode.public void setImageMode(short value)
Gets the image mode.
Value: The image mode.public final int getVersion()
Gets the version.
Value: The version.public void setVersion(int value)
Gets the version.
Value: The version.public final int getPatternLength()
Gets the length of the pattern.
Value: The length of the pattern.public void setPatternLength(int value)
Gets the length of the pattern.
Value: The length of the pattern.public int getSignature()
Gets the layer resource signature.
getSignature
in class LayerResource
public int getKey()
Gets the layer resource key.
getKey
in class LayerResource
public int getLength()
Gets the layer resource length in bytes.
getLength
in class LayerResource
public int getPsdVersion()
Gets the psd version.
getPsdVersion
in class LayerResource
public final void setPattern(int[] pixels, Rectangle bounds)
Sets the pattern.
pixels
- The pixels.bounds
- The bounds.PsdImageArgumentException
- Pixels array length must be equal to bounds areapublic void save(StreamContainer streamContainer, int psdVersion)
Saves the resource block data.
save
in class LayerResource
streamContainer
- The stream container to save to.psdVersion
- The PSD version.