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

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 61
61:         def initialize
62:             super
63:             @content = Content.new
64:             yield(self) if block_given?
65:         end

[Validate]