clipPath clippath

Layer Clip Path. Specifies a clip path for the current layer.

clipPath= *pathDefinition*

clipPathE= *pathName**[, *pathName*]

Path data.
Name of path embedded in layer source image (ASCII only).

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.

Only ASCII strings are supported for *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*:

M x,y
moveto absolute
Start a new subpath at x,y.
m x,y
moveto relative
L *{ x,y}
lineto absolute
Draw a line from the current position to x,y.
l *{ x,y}
lineto relative
C *{ x1,y1,x2,y2,x,y}
curveto absolute
Draw a Bezier curve from the current position to x,y. x1,y1 is the control point at the beginning of the curve and x2,y2 is the control point at the end of the curve.
c *{ x1,y1,x2,y2,x,y}
curveto relative
Z | z
Close the current subpath with a straight line.

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=