struct Cairo::Rectangle
- Cairo::Rectangle
- Struct
- Value
- Object
Overview
A data structure for holding a rectangle.
Wrapper for LibCairo::RectangleT
structure.
Defined in:
cairo/rectangle.crConstructors
-
.new(x : Float64, y : Float64, width : Float64, height : Float64)
Creates new rectangle using specified coordinates of top left corner (x, y), width and height.
-
.new(rect : LibCairo::RectangleT)
Creates new rectangle from
LibCairo::RectangleT
. -
.new
Creates uninitialized rectangle.
Instance Method Summary
-
#height : Float64
Height of the rectangle.
-
#height=(height : Float64)
Setter for height.
-
#to_cairo_rectange : LibCairo::RectangleT
Returns underlying
LibCairo::RectangleT
structure. -
#to_unsafe : LibCairo::PRectangleT
Pointer of underlying
LibCairo::RectangleT
structure. -
#width : Float64
Width of the rectangle.
-
#width=(width : Float64)
Setter for width.
-
#x : Float64
X coordinate of the left side of the rectangle.
-
#x=(x : Float64)
Setter for X coordinate.
-
#y : Float64
Y coordinate of the the top side of the rectangle.
-
#y=(y : Float64)
Setter for Y coordinate.
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.