Module | Magick::RVG::ShapeConstructors
In: | lib/rvg/embellishable.rb

Methods that construct basic shapes within a container

### Methods

circle ellipse line path polygon polyline rect

### Public Instance methods

circle(r, cx=0, cy=0)

Draws a circle whose center is [`cx`, `cy`] and radius is `r`.

ellipse(rx, ry, cx=0, cy=0)

Draws an ellipse whose center is [`cx`, `cy`] and having a horizontal radius `rx` and vertical radius `ry`.

line(x1=0, y1=0, x2=0, y2=0)

Draws a line from [`x1`, `y1`] to [`x2`, `y2`].

path(path)

Draws a path defined by an SVG path string or a PathData object.

polygon(*points)

Draws a polygon. The arguments are [`x`, `y`] pairs that define the points that make up the polygon. At least two points must be specified. If the last point is not the same as the first, adds an additional point to close the polygon.

polyline(*points)

Draws a polyline. The arguments are [`x`, `y`] pairs that define the points that make up the polyline. At least two points must be specified.

rect(width, height, x=0, y=0)

Draws a rectangle whose upper-left corner is [`x`, `y`] and with the specified `width` and `height`. Unless otherwise specified the rectangle has square corners. Returns a Rectangle object.

Draw a rectangle with rounded corners by calling the round method on the Rectangle object. `rx` and `ry` are the corner radii in the x- and y-directions. For example:

      canvas.rect(width, height, x, y).round(8, 6)

If `ry` is omitted it defaults to `rx`.

[Validate]