Partager via


clip method

Specifies a new clipping region.

 

Syntax

object.clip(fillRule);

Parameters

  • fillRule [in, optional]
    Type: DOMString

    Set to evenodd to use the even-odd fill rule. If missing, uses non-zero winding rule.

Return value

This method does not return a value.

Standards information

Remarks

The ICanvasRenderingContext2D::clip method creates a new clipping region by calculating the intersection of the current clipping region and the area that the current path describes.

Starting with Internet Explorer 11 this method provides an optional parameter to use the non-zero winding number rule or the even-odd rule. Earlier versions of this method offer only the default non-zero winding number rule. The new clipping region replaces the current clipping region.

See also

msFillRule