class RVG::Use < Object

Table of Contents

class methods

shared methods

This class implements the styles method and the transform methods.

class methods

new

RVG::Use.new(obj, x=0, y=0, width=nil, height=nil)-> aUse

Description

This method is usually invoked indirectly via the use method in the RVG, RVG::ClipPath, RVG::Group, and RVG::Pattern classes.

The use object is similar to a group. Any styles specified on the use will propogate to the referenced object. However, styles on the referenced object will override the styles specified on the RVG::Use object.

Arguments

obj
The object to be re-used. This is typically a group or RVG object but can also be any shape, text, or raster image, or even another use.
x, y
These arguments can be used to specify an additional translate transformation to be applied to the object within the user coordinate system.
width, height
The width and height of the rectangular region in which this object is placed. These arguments are ignored unless object is an RVG object. In this case, the values of width and height override the values of the width and height arguments that were specified when the RVG object was created.

Example

A simple 'use' on a 'rect'use example

What happens when a 'use' has chained transform methodsuse example

What happens when a 'use' has a chained 'style' methoduse example

Also see the example for RVG.new and the example for RVG::Group.new.