Packages

 

com.aspose.imaging.fileformats.tiff.pathresources

Class PathResource

  • java.lang.Object
    • com.aspose.imaging.fileformats.tiff.pathresources.PathResource


  • public class PathResource
    extends Object

    Represents Photoshop Path Resource.

    Code example:

    The following example shows how to create Clipping Path in TIFF image. In order to do that you need to create an instance of PathResource class. The following code demonstrates the way how you can create an empty path in TIFF image.


    TiffOptions options = new TiffOptions(TiffExpectedFormat.Default);
    TiffFrame frame = new TiffFrame(options, 800, 600);
    
    try (TiffImage image = new TiffImage(frame))
    {
        List<PathResource> list = new ArrayList<PathResource>();
        PathResource pr = new PathResource();
        pr.setBlockId(2000);
        pr.setName("My Clipping Path");
        pr.setRecords(new ArrayList<VectorPathRecord>());
        image.getActiveFrame().setPathResources(list);
    
        image.save("ImageWithEmptyPath.tiff");
    }
    

    • Constructor Detail

      • PathResource

        public PathResource()
    • Method Detail

      • getBlockId

        public final short getBlockId()

        Gets the block identifier.

        Value: The block identifier.
        Returns:
        the block identifier.
      • setBlockId

        public final void setBlockId(short value)

        Sets the block identifier.

        Value: The block identifier.
        Parameters:
        value - the block identifier.
      • getName

        public final String getName()

        Gets the name.

        Value: The name.
        Returns:
        the name.
      • setName

        public final void setName(String value)

        Sets the name.

        Value: The name.
        Parameters:
        value - the name.
      • getRecords

        public final List<VectorPathRecord> getRecords()

        Gets the records.

        Value: The records.
        Returns:
        the records.
      • setRecords

        public final void setRecords(List<VectorPathRecord> value)

        Sets the records.

        Value: The records.
        Parameters:
        value - the records.