struct Hpdf::Rectangle

Defined in:

hpdf/structs.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(x : Float32, y : Float32, width : Float32, height : Float32) #

[View source]
def self.new(x : Number, y : Number, width : Number, height : Number) #

[View source]
def self.new(rect : LibHaru::Rect) #

[View source]
def self.new #

[View source]

Instance Method Detail

def bottom : Float32 | Int32 #

[View source]
def bottom=(bottom : Float32) #

[View source]
def height : Float32 | Int32 #

[View source]
def height=(height : Float32 | Int32) #

[View source]
def left : Float32 | Int32 #

[View source]
def left=(left : Float32) #

[View source]
def 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


[View source]
def padding!(*, top : Float32 = 0, bottom : Float32 = 0, left : Float32 = 0, right : Float32 = 0) #

change the rect by using padding


[View source]
def right #

[View source]
def right=(right : Float32) #

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


[View source]
def to_unsafe #

[View source]
def top #

[View source]
def top=(top : Float32) #

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


[View source]
def width : Float32 | Int32 #

[View source]
def width=(width : Float32 | Int32) #

[View source]
def x : Float32 | Int32 #

[View source]
def x=(x : Float32 | Int32) #

[View source]
def y : Float32 | Int32 #

[View source]
def y=(y : Float32 | Int32) #

[View source]