Class Magick::RVG::Use
In: lib/rvg/container.rb
Parent: Object
Enum GeometryValue Stylable RVG\n[lib/rvg/clippath.rb\nlib/rvg/container.rb\nlib/rvg/deep_equal.rb\nlib/rvg/describable.rb\nlib/rvg/embellishable.rb\nlib/rvg/misc.rb\nlib/rvg/paint.rb\nlib/rvg/pathdata.rb\nlib/rvg/rvg.rb\nlib/rvg/stretchable.rb\nlib/rvg/stylable.rb\nlib/rvg/text.rb\nlib/rvg/transformable.rb\nlib/rvg/units.rb] Transformable Stretchable Embellishable Describable Duplicatable Comparable Image ImageList Enumerable Geometry OptionalMethodArguments HatchFill Draw lib/RMagick.rb lib/rvg/misc.rb ObjectData Application Pre_ObjectData_Descriptor Envelope Post_ObjectData_Descriptor IPTC Magick dot/m_14_0.png

A Use object allows the re-use of RVG and RVG::Group objects within a container. Create a Use object with the RVG::UseConstructors#use method.

Methods

new  

Included Modules

Stylable Transformable Duplicatable

Public Class methods

In a container, Use objects are created indirectly via the RVG::UseConstructors#use method. The x and y arguments can be used to specify an additional translation for the group. The width and height arguments specify a width and height for referenced RVG objects.

[Source]

     # File lib/rvg/container.rb, line 104
104:             def initialize(element, x=0, y=0, width=nil, height=nil)
105:                 super()
106: 
107:                 # If the element is not a group, defs, symbol, or rvg,
108:                 # wrap a group around it so it can get a transform and
109:                 # possibly a new viewport.
110:                 if ! element.respond_to?(:ref)
111:                     @element = Group.new
112:                     @element << element.deep_copy
113:                 else
114:                     @element = element.deep_copy
115:                 end
116:                 @element.ref(x, y, width, height)
117:             end

[Validate]