Class Magick::RVG::Group
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 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

Define a collection of shapes, text, etc. that can be reused. Group objects are containers. That is, styles and transforms defined on the group are used by contained objects such as shapes, text, and nested groups unless overridden by a nested container or the object itself. Groups can be reused with the RVG::UseConstructors#use method. Create groups within containers with the RVG::StructureConstructors#g method.

Example:

  # All elements in the group will be translated by 50 in the
  # x-direction and 10 in the y-direction.
  rvg.g.translate(50, 10).styles(:stroke=>'red',:fill=>'none') do |grp|
      # The line will be red.
      grp.line(10,10, 20,20)
      # The circle will be blue.
      grp.circle(10, 20, 20).styles(:stroke=>'blue')
  end

Methods

new  

Included Modules

Stylable Transformable Embellishable Describable Duplicatable

Public Class methods

[Source]

    # File lib/rvg/container.rb, line 62
62:             def initialize
63:                 super
64:                 @content = Content.new
65:                 yield(self) if block_given?
66:             end

[Validate]