Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

PictureClipPath-class

Class "PictureClipPath"


Description

A description of a clipping path that is meant to be used as part of a larger picture (as it does not directly draw anything itself). This is primarily used for determining the bounding box of the clipping region (because R graphics only supports rectangular clipping regions). This object will have a greater effect with it is used in conjunction with the gridSVG package as it can apply non-rectangular clipping regions.

Slots

content:

Object of class "list". A list of "PictureContent" objects that describe the outline(s) of the clipping region(s).

label:

Object of class "character". A label to identify the clipping path by so that it may be referred to by content within the image.

Extends

Class PictureContent, directly.

Methods

applyTransform

signature(object = "PictureClipPath", tm = "matrix"): transforms the locations described by contents of the clip path object by a 3x3 transformation matrix and returns a "PictureClipPath" object whose children have had locations transformed by the matrix.

grobify

signature(object = "PictureClipPath"): convert the clipping path into a grid grob. Useful only in conjunction with the gridSVG package for non-rectangular paths.

This grobify method takes three arguments:

defs

Required. This argument expects a "PictureDefinitions" object that contains referenced content.

gpFUN

A function that takes a gpar object and returns a modified gpar object. The default value for this arugment is the identity function.

ext

A character vector. See grid.picture for more information on what this extension selection parameter means, in addition to the valid values this argument takes.

Author(s)

Simon Potter

See Also


grImport2

Importing 'SVG' Graphics

v0.2-0
GPL (>= 2)
Authors
Simon Potter [aut], Paul Murrell [aut, cre] (<https://orcid.org/0000-0002-3224-8858>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.