class HexaPDF::Content::GraphicObject::Geom2D

Parent

This class provides support for drawing Geom2D objects like line segments and polygons.

See: Geom2D - github.com/gettalong/geom2d

Attributes

object[RW]

The Geom2D object that should be drawn

path_only[RW]

Specifies whether only paths should be drawn or if they should be stroked/filled too

point_radius[RW]

The radius to use when drawing Geom2D::Point objects; defaults to 1

Public Class Methods

configure(**kwargs)

Creates and configures a new Geom2D drawing support object.

See configure for the allowed keyword arguments.

new()

Creates a Geom2D drawing support object.

Public Instance Methods

configure(object:, point_radius: nil, path_only: nil)

Configures the Geom2D drawing support object. The following arguments are allowed:

:object

The object that should be drawn.

:point_radius

The radius of the points when drawing points.

:path_only

Whether only the path should be drawn.

Any arguments not specified are not modified and retain their old value, see the getter methods for the inital values.

Returns self.

draw(canvas)

Draws the Geom2D object onto the given Canvas.