Full version, Basic version

Specification link: 14.3 Clipping paths

masking-opacity-01-b ← index → masking-path-02-b

# masking-path-01-b
SVG Image | PNG Image
$RCSfile: masking-path-01-b.svg,v $ Rectangle being clipped Line of text to be clipped Group being clipped $Revision: 1.10 $ |

Test to see if the basic clipping works using the clipPath element and the clip-path property.

This test uses the following elements : <clipPath> and the following properties : clip-path.

The test at the top shows a red rectangle (with black stroke) being clipped by another rectangle. So only the middle portion of the red rectangle should be visible. Also the black stroke should only be visible along the top and bottom edge of the rectangle.

The example at the bottom has a group containing a text string and two rectangles. The group has a clipping path defined using two overlapping rectangles. Of concern is the overlapping area shared by the two rectangles. There should not be holes in this overlapping area, the clip region is the union of the two rectangles. For clarity, guide rectangles in grey show the position of the clipping rectangles.

The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).

masking-opacity-01-b ← index → masking-path-02-b