struct Gdk::Rectangle
- Gdk::Rectangle
- Struct
- Value
- Object
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.crConstructors
- .new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
- .new(data : LibGdk::Rectangle, _transfer : GICrystal::Transfer)
- .new(x : Int32 | Nil = nil, y : Int32 | Nil = nil, width : Int32 | Nil = nil, height : Int32 | Nil = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
- #==(other : self) : Bool
- #contains_point(x : Int32, y : Int32) : Bool
- #equal(rect2 : Gdk::Rectangle) : Bool
- #height(*args, **options)
- #height(*args, **options, &)
- #height=(arg)
- #intersect(src2 : Gdk::Rectangle) : Gdk::Rectangle
- #union(src2 : Gdk::Rectangle) : Gdk::Rectangle
- #width(*args, **options)
- #width(*args, **options, &)
- #width=(arg)
- #x(*args, **options)
- #x(*args, **options, &)
- #x=(arg)
- #y(*args, **options)
- #y(*args, **options, &)
- #y=(arg)
Constructor Detail
def self.new(x : Int32 | Nil = nil, y : Int32 | Nil = nil, width : Int32 | Nil = nil, height : Int32 | Nil = nil)
#
Class Method Detail
Returns the type id (GType) registered in GLib type system.