Class Txt2Resource

  • public class Txt2Resource
    extends LayerResource

    Txt2 resource class

    • Field Detail


        public static final int TYPE_TOOL_KEY

        The type tool info key.

        See Also:
        Constant Field Values
    • Constructor Detail

      • Txt2Resource

        public Txt2Resource()

        Initializes a new instance of the Txt2Resource class.

    • Method Detail

      • getSignature

        public int getSignature()

        Gets the layer resource signature.

        Specified by:
        getSignature in class LayerResource
      • getKey

        public int getKey()

        Gets the layer resource key.

        Specified by:
        getKey in class LayerResource
      • getLength

        public int getLength()

        Gets the layer resource length in bytes.

        Specified by:
        getLength in class LayerResource
      • getPsdVersion

        public int getPsdVersion()

        Gets the minimal psd version required for layer resource. 0 indicates no restrictions.

        Specified by:
        getPsdVersion in class LayerResource
      • getData

        public byte[] getData()

        Gets or sets the data.

        Value: The data.
      • setData

        public void setData(byte[] value)

        Gets or sets the data.

        Value: The data.
      • addTextRecord

        public final int addTextRecord(String text)

        Adds the text record to Resource and returns id of text record

        text - The record text.
        Returns Id of text record for resource
        PsdImageException - Unknown Txt2 Resource version
      • getTextData

        public final String[] getTextData()

        Gets the text record from resource data.

        Array of text record
      • save

        public void save(StreamContainer streamContainer,
                         int psdVersion)

        Saves the specified stream container.

        Specified by:
        save in class LayerResource
        streamContainer - The stream container.
        psdVersion - The PSD version.