Module Magick::RVG::StructureConstructors
In: lib/rvg/embellishable.rb
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

Methods that construct container objects within a container

Methods

g   rvg  

Public Instance methods

Defines a group.

This method constructs a new Group container object. The styles and transforms specified on this object will be used by objects contained within, unless overridden by an inner container or the contained object itself. Define grouped elements by calling RVG::Embellishable methods within the associated block.

[Source]

     # File lib/rvg/embellishable.rb, line 377
377:         def g(&block)
378:             group = Group.new(&block)
379:             @content << group
380:             return group
381:         end

Establishes a new viewport. [x, y] is the coordinate of the upper-left corner within the containing viewport. This is a container method. Styles and transforms specified on this object will be used by objects contained within, unless overridden by an inner container or the contained object itself.

[Source]

     # File lib/rvg/embellishable.rb, line 355
355:         def rvg(cols, rows, x=0, y=0, &block)
356:             rvg = Magick::RVG.new(cols, rows, &block)
357:             begin
358:                 x, y = Float(x), Float(y)
359:             rescue ArgumentError
360:                 args = [cols, rows, x, y]
361:                 raise ArgumentError, "at least one argument is not convertable to Float (got #{args.collect {|a| a.class}.join(', ')})"
362:             end
363:             rvg.corner(x, y)
364:             @content << rvg
365:             return rvg
366:         end

[Validate]