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) #

def self.new(data : LibGdk::Rectangle, _transfer : GICrystal::Transfer) #

def self.new(x : Int32? = nil, y : Int32? = nil, width : Int32? = nil, height : Int32? = nil) #

Class Method Detail

def self.g_type : UInt64 #

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


Instance Method Detail

def ==(other : self) : Bool #

def contains_point(x : Int32, y : Int32) : Bool #

def equal(rect2 : Gdk::Rectangle) : Bool #

def height(*args, **options) #

def height(*args, **options, &) #

def height=(arg) #

def intersect(src2 : Gdk::Rectangle) : Gdk::Rectangle #

def union(src2 : Gdk::Rectangle) : Gdk::Rectangle #

def width(*args, **options) #

def width(*args, **options, &) #

def width=(arg) #

def x(*args, **options) #

def x(*args, **options, &) #

def x=(arg) #

def y(*args, **options) #

def y(*args, **options, &) #

def y=(arg) #