public class Txt2Resource extends LayerResource
Txt2 resource class
Modifier and Type | Field and Description |
---|---|
static int |
TypeToolKey
The type tool info key.
|
PsbResourceSignature, ResourceSignature
Constructor and Description |
---|
Txt2Resource()
Initializes a new instance of the
Txt2Resource class. |
Modifier and Type | Method and Description |
---|---|
int |
addTextRecord(String text,
RectangleF bounds)
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 TypeToolKey
The type tool info key.
public Txt2Resource()
Initializes a new instance of the Txt2Resource
class.
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 final byte[] getData()
Gets or sets the data.
Value: The data.public final void setData(byte[] value)
Gets or sets the data.
Value: The data.public int getSignature()
Gets the layer resource signature.
getSignature
in class LayerResource
public final int addTextRecord(String text, RectangleF bounds)
Adds the text record to Resource and returns id of text record.
text
- The record text.bounds
- The bounds.PsdImageException
- Unknown Txt2 Resource version.public 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.