In addition to the methods listed above, class
RVG::ClipPath
also implements the styles method and the shape methods.
RVG::ClipPath.new(clip_path_units) [ { |clippath| drawing method calls } ] -> clippath
Creates a clipping path. A clipping path is a combination of path, text, and basic shape objects that define an outline. Attach the clipping path to an object such as a raster image or RVG object with the :clip_path style. When RVG draws the object, things "outside" the path are not drawn.
The ClipPath.new method yields to a block. Within the block define the clipping path with a combination of path, basic shape, and text objects. You can also use the use method to refer to a previously-defined object or group of objects.
userSpaceOnUse
, the contents of the clipping
path represent values in the current user coordinate system
in place at the time when the clipping path is referenced. if
objectBoundingBox, then the user coordinate system for the
contents of the clipping path is established using the
bounding box of the object to which the clipping path is
applied. The default is userSpaceOnUse
.The :clip_rule style.
clippath.desc ->
string
clippath.desc = string
desc
attribute to
assign a text description to the clipping path.
clippath.metadata ->
string
clippath.metadata = string
metadata
attribute to
assign additional metadata to the clipping path.
clippath.title ->
string
clippath.title = string
title
attribute to
assign a title to the clipping path.
clippath.text(x=0, y=0, text=nil) [{|text| ...}] -> text
Calls RVG::Text.new to construct a text object and adds it to the clipping path. Yields to a block if one is present, passing the new text object as an argument.
The RVG::Text
object, so other
RVG::Text
methods can be chained to this
method.
clippath.use(obj, x=0, y=0, width=nil, height=nil) -> use
Calls RVG::Use.new to
constructs a use
object and adds it to the
clipping path.
When the referenced argument is another RVG object,
width and height can be used to specify the width and height
of the viewport. If present and non-nil, these arguments
override any width and height specified when the RVG object was
created. You must specify the viewport size either when
creating the RVG object or when referencing it with
use
.
See RVG::Use.new
The RVG::Use
object, so other
RVG::Use
methods can be chained to this
method.