class PDF::Rectangle

Overview

Rectangles are used to describe locations on a page and bounding boxes for a variety of objects, such as fonts. A rectangle is written as an array of four numbers giving the coordinates of a pair of diagonally opposite corners. Typically, the array takes the form [llx lly urx ury] specifying the lower-left x, lower-left y, upper-right x, and upper-right y coordinates of the rectangle, in that order. Note: Although rectangles are conventionally specified by their lower-left and upperright corners, it is acceptable to specify any two diagonally opposite corners. Applications that process PDF should be prepared to normalize such rectangles in situations where specific corners are required.

Included Modules

Defined in:

pdf/data/rectangle.cr

Instance Method Summary

Instance methods inherited from module PDF::Renderable

render_to_pdf(io : IO) : IO render_to_pdf

Instance Method Detail

def format : String #

Typically, the array takes the form [llx lly urx ury]


[View source]
def initizlize(llx : Number, lly : Number, urx : Number, ury : Number) #

[View source]
def llx : Float64 | Int64 | Nil #

[View source]
def lly : Float64 | Int64 | Nil #

[View source]
def render_to_pdf(io : IO) : IO #
Description copied from module PDF::Renderable

render your data into a pdf file , and return the rendered IO


[View source]
def urx : Float64 | Int64 | Nil #

[View source]
def ury : Float64 | Int64 | Nil #

[View source]