public class PattResource extends LayerResource
Class PattResource. Resource with pattern data
LayerResource
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_TOOL_KEY
The type tool info key.
|
PSB_RESOURCE_SIGNATURE, RESOURCE_SIGNATURE
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 the name.
|
int[] |
getPatternData()
Gets the pattern data.
|
String |
getPatternId()
Gets 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 |
setName(String value)
The name.
|
void |
setPattern(int[] pixels,
Rectangle bounds)
Sets the pattern.
|
void |
setPatternId(String value)
The pattern identifier.
|
toString
public static final int TYPE_TOOL_KEY
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.
public final String getPatternId()
Gets the pattern identifier.
public final void setPatternId(String value)
The pattern identifier.
value
- The pattern identifier.public final String getName()
Gets the name.
public final void setName(String value)
The name.
value
- The name.public final short getHeight()
Gets the height.
public final short getWidth()
Gets the width.
public final short getImageMode()
Gets the image mode.
public final int getVersion()
Gets the version.
public final int getPatternLength()
Gets 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.