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 Array Geometry HatchFill Draw lib/RMagick.rb lib/rvg/rvg.rb Magick Module: Magick

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

[Validate]