Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GdkRectangleLayout

[12:14] static extends: object

Generated struct layout helper for GIR record Rectangle.

Methods

  • layout ()

    Returns the Panama struct layout for Rectangle.

class: GdkRectangle

[37:7] extends: object

Represents a rectangle. 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 [method@Gdk.Rectangle.intersect]; to find the union of two rectangles use [method@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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GdkRectangle (Handle = null)

    Creates a new Rectangle by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • contains_point (int x, int y)

    Returns %TRUE if @rect contains the point described by @x and @y.

    • @p x is X coordinate.
    • @p y is Y coordinate.
    • @r %TRUE if @rect contains the point.
  • equal (object rect2)

    Checks if the two given rectangles are equal.

    • @p rect2 is a GdkRectangle.
    • @r %TRUE if the rectangles are equal..
  • intersect (object src2)

    Calculates the intersection of two rectangles. It is allowed for @dest to be the same as either @src1 or @src2. If the rectangles do not intersect,

    • @dest’s width and height is set to 0 and its x and y values are undefined. If you are only interested in whether the rectangles intersect, but not in the intersecting area itself, pass %NULL for @dest.
    • @p src2 is a GdkRectangle.
    • @p dest is return location for the intersection of @src1 and @src2.
    • @r %TRUE if the rectangles intersect..
  • union (object src2)

    Calculates the union of two rectangles. The union of rectangles @src1 and

    • @src2 is the smallest rectangle which includes both @src1 and @src2 within it. It is allowed for @dest to be the same as either @src1 or
    • @src2. Note that this function does not ignore 'empty' rectangles (ie. with zero width or height).
    • @p src2 is a GdkRectangle.
    • @p dest is return location for the union of @src1 and @src2.
    • @r None.