Class | Magick::RVG
In: | lib/rvg/rvg.rb lib/rvg/describable.rb lib/rvg/transformable.rb lib/rvg/stylable.rb lib/rvg/stretchable.rb lib/rvg/container.rb lib/rvg/text.rb lib/rvg/pathdata.rb lib/rvg/paint.rb lib/rvg/deep_equal.rb lib/rvg/misc.rb lib/rvg/embellishable.rb lib/rvg/units.rb lib/rvg/clippath.rb
Parent: | Object

### Methods

background_fill= background_fill_opacity= background_image= background_pattern= background_position= convert_one_to_float convert_to_float deep_equal deep_equal dpi= draw fmsg new

### Included Modules

Stylable Transformable Stretchable Embellishable Describable Duplicatable

### Classes and Modules

Module Magick::RVG::Describable
Module Magick::RVG::Duplicatable
Module Magick::RVG::Embellishable
Module Magick::RVG::ImageConstructors
Module Magick::RVG::PreserveAspectRatio
Module Magick::RVG::ShapeConstructors
Module Magick::RVG::Stretchable
Module Magick::RVG::StructureConstructors
Module Magick::RVG::Stylable
Module Magick::RVG::TextConstructors
Module Magick::RVG::Transformable
Module Magick::RVG::UseConstructors
Class Magick::RVG::Circle
Class Magick::RVG::ClipPath
Class Magick::RVG::Ellipse
Class Magick::RVG::Group
Class Magick::RVG::Image
Class Magick::RVG::Line
Class Magick::RVG::Path
Class Magick::RVG::PathData
Class Magick::RVG::Pattern
Class Magick::RVG::PolyShape
Class Magick::RVG::Polygon
Class Magick::RVG::Polyline
Class Magick::RVG::Rect
Class Magick::RVG::Text
Class Magick::RVG::TextBase
Class Magick::RVG::Use
Class Magick::RVG::Utility

### Constants

WORD_SEP | = | / /

### Attributes

background_fill | [R] | The background fill color specified by background_fill=
background_fill_opacity | [R] | The background fill color opacity specified by background_fill_opacity=
background_image | [R] | The background image specified by background_image=
background_position | [R] | The background image layout specified by background_position=
canvas | [R] | The image after drawing has completed
dpi | [R] |
height | [R] |
width | [R] |
x | [R] | For embedded RVG objects, the x-axis coordinate of the upper-left corner
y | [R] | For embedded RVG objects, the x-axis coordinate of the upper-left corner

### Public Class methods

convert_one_to_float(arg)
convert_to_float(*args)
dpi=(n)
fmsg(*args)

Convert an array of method arguments to Float objects. If any cannot be converted, raise ArgumentError and issue a message.

new(width=nil, height=nil) {|self| ...}

Draw a `width` x `height` image. The image is specified by calling one or more drawing methods on the RVG object. You can group the drawing method calls in the optional associated block. The `x` and `y` arguments have no meaning for the outermost RVG object. On nested RVG objects [`x`, `y`] is the coordinate of the upper-left corner in the containing canvas on which the nested RVG object is placed.

Drawing occurs on a `canvas` created by the draw method. By default the canvas is transparent. You can specify a different canvas with the background_fill= or background_image= methods.

RVG objects are containers. That is, styles and transforms defined on the object are used by contained objects such as shapes, text, and groups unless overridden by an inner container or the object itself.

### Public Instance methods

background_fill=(color)

Sets the canvas background color. Either a Magick::Pixel or a color name. The default fill is "none", that is, transparent black.

background_fill_opacity=(opacity)

Opacity of the background fill color, a number between 0.0 (transparent) and 1.0 (opaque). The default is 1.0 when the background_fill= attribute has been set.

background_image=(bg_image)

Sets an image to use as the canvas background. See background_position= for layout options.

background_pattern=(filler)

Sets an object to use to fill the canvas background. The object must have a `fill` method. See the Fill Classes section in the RMagick doc for more information.

background_position=(pos)

How to position the background image on the canvas. One of the following symbols:

:scaled
  Scale the image to the canvas width and height.
:tiled
  Tile the image across the canvas.
:fit
  Scale the image to fit within the canvas while retaining the image proportions. Center the image on the canvas. Color any part of the canvas not covered by the image with the background color.

deep_equal(other)
deep_equal(other)
draw()

Construct a canvas or reuse an existing canvas. Execute drawing commands. Return the canvas.

[Validate]