struct Gdk::Rectangle

Overview

A Gdk::Rectangle data type for representing rectangles.

Gdk::Rectangle is identical to cairo_::rectangle_t. Together with Cairo’s cairo_::region_t data type, these are the central types for representing sets of pixels.

The intersection of two rectangles can be computed with Gdk::Rectangle#intersect; to find the union of two rectangles use Gdk::Rectangle#union.

The cairo_::region_t type provided by Cairo is usually used for managing non-rectangular clipping of graphical operations.

The Graphene library has a number of other data types for regions and volumes in 2D and 3D.

Defined in:

lib/gi-crystal/src/auto/gdk-4.0/rectangle.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

[View source]
def self.new(data : LibGdk::Rectangle, _transfer : GICrystal::Transfer) #

[View source]
def self.new(x : Int32 | Nil = nil, y : Int32 | Nil = nil, width : Int32 | Nil = nil, height : Int32 | Nil = nil) #

[View source]

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


[View source]

Instance Method Detail

def ==(other : self) : Bool #

[View source]
def contains_point(x : Int32, y : Int32) : Bool #

[View source]
def equal(rect2 : Gdk::Rectangle) : Bool #

[View source]
def height(*args, **options) #

[View source]
def height(*args, **options, &) #

[View source]
def height=(arg) #

[View source]
def intersect(src2 : Gdk::Rectangle) : Gdk::Rectangle #

[View source]
def union(src2 : Gdk::Rectangle) : Gdk::Rectangle #

[View source]
def width(*args, **options) #

[View source]
def width(*args, **options, &) #

[View source]
def width=(arg) #

[View source]
def x(*args, **options) #

[View source]
def x(*args, **options, &) #

[View source]
def x=(arg) #

[View source]
def y(*args, **options) #

[View source]
def y(*args, **options, &) #

[View source]
def y=(arg) #

[View source]