clipPath clippath
Layer Clip Path. Specifies a clip path for the current layer.
clipPath= *pathDefinition*
clipPathE= *pathName**[, *pathName*]
Any parts of the layer that falls outside the area defined by clipPath= are rendered transparent.
*pathName* is the name of a path embedded in the layer source image. The path is automatically transformed to maintain relative alignment with the image contents. If more than one *pathName* is specified, the server clips the image to the intersection of these paths. Any *pathName* not found in the source image is ignored.
*pathName*.*pathDefinition* allows specifying explicit path data in layer pixel coordinates.
If size= is specified and not 0,0, the layer is presized. In this case, path coordinates are relative to the upper-left corner of the layer rectangle and the layer is positioned based on origin= or its default. Any regions of the path outside the layer rectangle remain transparent.
If size= is not specified for a solid color or text layer, the layer is considered self-sizing with the extent of the path determining its size. If origin= is not specified, it defaults to (0,0) of the path coordinate space. This workflow process effectively allows path coordinates to be specified relative to the origin of layer 0.
scale=, rotate=, and anchor= commands are not permitted for self-sizing solid color layers.*pathDefinition* accepts a string similar to the value of the d= attribute of the SVG <path> element, except that commas are used instead of spaces to separate values. *pathDefinition* can include one or more closed-loop subpaths.
The following path commands are supported in *pathDefinition*:
Uppercase commands indicate that the coordinate values are in absolute pixel positions (relative to the upper-left of the layer rectangle). Pixel offsets follow lowercase commands relative to the current position.
‘m’ or ‘M’ always starts a new subpath. Subpaths are closed automatically (with a straight line) if ‘Z’ or ‘z’ is not specified at the end.
If a subpath begins with a relative moveto (‘m’), it is relative to one of the following:
- The starting point of the previous subpath, if it was closed with ‘z’ or ‘Z’.
- The end point of the previous subpath, if it was not closed explicitly.
- 0,0, if it is the first subpath.
Properties section-d4127db0dac54e3cbd44f7ea1e001960
Layer attribute. Applies to the current layer or to the composite image if layer=comp. Effect layers ignore it.
The modifier clipPathE= is ignored if no path with the specified name is found in the layer source image, or if the layer source is not an image.
Default section-076c35ea37fa4a44ada253b4c2dec1dd
None, for no additional clipping of the layer.
See also section-dd8110fb6f5c45eba6284c5ec5f49056
clipXpath= , textFlowPath= , extend=