struct Cairo::Rectangle

Overview

A data structure for holding a rectangle.

Wrapper for LibCairo::RectangleT structure.

Defined in:

cairo/rectangle.cr

Constructors

Instance Method Summary

Constructor Detail

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

Creates new rectangle using specified coordinates of top left corner (x, y), width and height.


[View source]
def self.new(rect : LibCairo::RectangleT) #

Creates new rectangle from LibCairo::RectangleT.


[View source]
def self.new #

Creates uninitialized rectangle.


[View source]

Instance Method Detail

def height : Float64 #

Height of the rectangle.


[View source]
def height=(height : Float64) #

Setter for height.


[View source]
def to_cairo_rectange : LibCairo::RectangleT #

Returns underlying LibCairo::RectangleT structure.


[View source]
def to_unsafe : LibCairo::PRectangleT #

Pointer of underlying LibCairo::RectangleT structure.


[View source]
def width : Float64 #

Width of the rectangle.


[View source]
def width=(width : Float64) #

Setter for width.


[View source]
def x : Float64 #

X coordinate of the left side of the rectangle.


[View source]
def x=(x : Float64) #

Setter for X coordinate.


[View source]
def y : Float64 #

Y coordinate of the the top side of the rectangle.


[View source]
def y=(y : Float64) #

Setter for Y coordinate.


[View source]