Packages

 

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

Class PattResource

    • Field Detail

      • TYPE_TOOL_KEY

        public static final int TYPE_TOOL_KEY

        The type tool info key.

        See Also:
        Constant Field Values
    • Constructor Detail

      • PattResource

        public PattResource()

        Initializes a new instance of the PattResource class.

      • PattResource

        public PattResource(byte[] bytes)

        Initializes a new instance of the PattResource class.

        Parameters:
        bytes - The bytes.
    • Method Detail

      • getPatternData

        public final int[] getPatternData()

        Gets the pattern data.

        Returns:
        the pattern data.
      • getPatternId

        public final String getPatternId()

        Gets the pattern identifier.

        Returns:
        The pattern identifier.
      • setPatternId

        public final void setPatternId(String value)

        The pattern identifier.

        Parameters:
        value - The pattern identifier.
      • getName

        public final String getName()

        Gets the name.

        Returns:
        The name.
      • setName

        public final void setName(String value)

        The name.

        Parameters:
        value - The name.
      • getHeight

        public final short getHeight()

        Gets the height.

        Returns:
        The height.
      • getWidth

        public final short getWidth()

        Gets the width.

        Returns:
        The width.
      • getImageMode

        public final short getImageMode()

        Gets the image mode.

        Returns:
        The image mode.
      • getVersion

        public final int getVersion()

        Gets the version.

        Returns:
        The version.
      • getPatternLength

        public final int getPatternLength()

        Gets the length of the pattern.

        Returns:
        the length of the pattern.
      • getSignature

        public int getSignature()

        Gets the layer resource signature.

        Specified by:
        getSignature in class LayerResource
        Returns:
        the layer resource signature.
      • getKey

        public int getKey()

        Gets the layer resource key.

        Specified by:
        getKey in class LayerResource
        Returns:
        the layer resource key.
      • getLength

        public int getLength()

        Gets the layer resource length in bytes.

        Specified by:
        getLength in class LayerResource
        Returns:
        the layer resource length in bytes.
      • getPsdVersion

        public int getPsdVersion()

        Gets the psd version.

        Specified by:
        getPsdVersion in class LayerResource
        Returns:
        the psd version.
      • setPattern

        public final void setPattern(int[] pixels,
                                     Rectangle bounds)

        Sets the pattern.

        Parameters:
        pixels - The pixels.
        bounds - The bounds.
        Throws:
        PsdImageArgumentException - Pixels array length must be equal to bounds area
      • save

        public void save(StreamContainer streamContainer,
                         int psdVersion)

        Saves the resource block data.

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