class Gdk::Rectangle


A GdkRectangle data type for representing rectangles.

GdkRectangle 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:



Class Method Summary

Instance Method Summary

Constructor Detail

def : Pointer(Void), transfer : GICrystal::Transfer) #

def : 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 #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.

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

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

def height : Int32 #

def height=(value : Int32) #

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

def to_unsafe #

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

def width : Int32 #

def width=(value : Int32) #

def x : Int32 #

def x=(value : Int32) #

def y : Int32 #

def y=(value : Int32) #