Packages

 

com.aspose.psd.fileformats.psd.layers.layerresources

Class Txt2Resource



  • public class Txt2Resource
    extends LayerResource

    Txt2 resource class

    • Field Detail

      • TypeToolKey

        public static final int TypeToolKey

        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

      • 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 final byte[] getData()

        Gets or sets the data.

        Value: The data.
      • setData

        public final void setData(byte[] value)

        Gets or sets the data.

        Value: The data.
      • getSignature

        public int getSignature()

        Gets the layer resource signature.

        Specified by:
        getSignature in class LayerResource
      • addTextRecord

        public final int addTextRecord(String text,
                                       RectangleF bounds)

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

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

        public final String[] getTextData()

        Gets the text record from resource data.

        Returns:
        Array of text record
      • save

        public void save(StreamContainer streamContainer,
                         int psdVersion)

        Saves the specified stream container.

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