NAME

PDF::Make::Builder::Shape::Box - Filled or stroked rectangle for PDF::Make

SYNOPSIS

$builder->add_shape(box => {
    fill_colour => '#eee',
    x           => 50,
    y           => 100,
    w           => 200,
    h           => 80,
});

DESCRIPTION

Draws a rectangle on the current page canvas, either filled or stroked (when fill_colour is 'transparent').

PROPERTIES

fill_colour (Str, default '#000')

Fill colour as a hex string. Use 'transparent' for a stroked outline only.

x (Num)

Left edge X coordinate. Defaults to the content area's left edge.

y (Num)

Bottom edge Y coordinate (bottom-left origin). Defaults to the current cursor minus box height.

w (Num)

Width in points. Defaults to the full content width.

h (Num)

Height in points. Defaults to 50.

METHODS

add($builder)

Renders the rectangle onto the current page canvas. Returns $self.

SEE ALSO

PDF::Make::Builder, PDF::Make::Builder::Shape::Line