struct

Hpdf::Rectangle

Inherits Struct / Value / Object

Constructors

new(x : Float32, y : Float32, width : Float32, height : Float32)
Source
new(x : Number, y : Number, width : Number, height : Number)
Source
new(rect : LibHaru::Rect)
Source

Instance methods

bottom
Source
bottom=(bottom : Float32)
Source
height
Source
height=(height : Float32 | Int32)
Source
left
Source
left=(left : Float32)
Source
padding(*, top : Float32 = 0, bottom : Float32 = 0, left : Float32 = 0, right : Float32 = 0) : Rectangle

change the rect by using padding and return a new rect based on it

Source
padding!(*, top : Float32 = 0, bottom : Float32 = 0, left : Float32 = 0, right : Float32 = 0)

change the rect by using padding

Source
right
Source
right=(right : Float32)

will be converted to width, so left has to be set before

Source
to_unsafe
Source
top=(top : Float32)

will be converted to height, so bottom has to be set before

Source
width
Source
width=(width : Float32 | Int32)
Source
x=(x : Float32 | Int32)
Source
y=(y : Float32 | Int32)
Source