public class PathResource extends Object
Represents Photoshop Path Resource.
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 and Description |
---|
PathResource() |
Modifier and Type | Method and Description |
---|---|
short |
getBlockId()
Gets the block identifier.
|
String |
getName()
Gets the name.
|
List<VectorPathRecord> |
getRecords()
Gets the records.
|
void |
setBlockId(short value)
Sets the block identifier.
|
void |
setName(String value)
Sets the name.
|
void |
setRecords(List<VectorPathRecord> value)
Sets the records.
|
public final short getBlockId()
Gets the block identifier.
Value: The block identifier.public final void setBlockId(short value)
Sets the block identifier.
Value: The block identifier.value
- the block identifier.public final String getName()
Gets the name.
Value: The name.public final void setName(String value)
Sets the name.
Value: The name.value
- the name.public final List<VectorPathRecord> getRecords()
Gets the records.
Value: The records.public final void setRecords(List<VectorPathRecord> value)
Sets the records.
Value: The records.value
- the records.