public class Txt2Resource extends LayerResource
Txt2 resource class
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_TOOL_KEY
The type tool info key.
|
PSB_RESOURCE_SIGNATURE, RESOURCE_SIGNATURE
Constructor and Description |
---|
Txt2Resource()
Initializes a new instance of the
Txt2Resource class. |
Modifier and Type | Method and Description |
---|---|
int |
addTextRecord(String text)
Adds the text record to Resource and returns id of text record
|
byte[] |
getData()
Gets or sets the data.
|
int |
getKey()
Gets the layer resource key.
|
int |
getLength()
Gets the layer resource length in bytes.
|
int |
getPsdVersion()
Gets the minimal psd version required for layer resource.
|
int |
getSignature()
Gets the layer resource signature.
|
String[] |
getTextData()
Gets the text record from resource data.
|
void |
save(StreamContainer streamContainer,
int psdVersion)
Saves the specified stream container.
|
void |
setData(byte[] value)
Gets or sets the data.
|
toString
public static final int TYPE_TOOL_KEY
The type tool info key.
public Txt2Resource()
Initializes a new instance of the Txt2Resource
class.
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 minimal psd version required for layer resource. 0 indicates no restrictions.
getPsdVersion
in class LayerResource
public byte[] getData()
Gets or sets the data.
Value: The data.public void setData(byte[] value)
Gets or sets the data.
Value: The data.public final int addTextRecord(String text)
Adds the text record to Resource and returns id of text record
text
- The record text.PsdImageException
- Unknown Txt2 Resource versionpublic final String[] getTextData()
Gets the text record from resource data.
public void save(StreamContainer streamContainer, int psdVersion)
Saves the specified stream container.
save
in class LayerResource
streamContainer
- The stream container.psdVersion
- The PSD version.