class HexaPDF::Layout::Style::Border

Parent

Represents the border of a rectangular area.

Attributes

color[R]

The colors of each edge. See Quad.

draw_on_bounds[RW]

Specifies whether the border should be drawn inside the provided rectangle (false, default) or on it (true).

style[R]

The styles of each edge. See Quad.

width[R]

The widths of each edge. See Quad.

Public Class Methods

new(width: 0, color: 0, style: :solid, draw_on_bounds: false)

Creates a new border style. All arguments can be set to any value that a Quad can process.

Public Instance Methods

draw(canvas, x, y, w, h)

Draws the border onto the canvas.

Depending on draw_on_bounds the border is drawn inside the rectangle (x, y, w, h) or on it.

initialize_copy(other)

Duplicates a Border object’s properties.

Calls superclass method
none?()

Returns true if there is no border.