Commit 6a322e11 authored by Elliot Lee's avatar Elliot Lee
Browse files

gdk_region_get_clipbox() lets you get a rectangle around the region.



gdk_region_get_clipbox() lets you get a rectangle around the region.
parent 4d3f6feb
......@@ -770,6 +770,9 @@ guchar gdk_color_context_get_index_from_palette (GdkColorContext *cc,
GdkRegion* gdk_region_new (void);
void gdk_region_destroy (GdkRegion *region);
void gdk_region_get_clipbox(GdkRegion *region,
GdkRectangle *rectangle);
gboolean gdk_region_empty (GdkRegion *region);
gboolean gdk_region_equal (GdkRegion *region1,
GdkRegion *region2);
......
......@@ -82,6 +82,25 @@ gdk_region_equal (GdkRegion *region1,
return XEqualRegion (private1->xregion, private2->xregion);
}
void
gdk_region_get_clipbox(GdkRegion *region,
GdkRectangle *rectangle)
{
GdkRegionPrivate *rp;
XRectangle r;
g_return_if_fail(region != NULL);
g_return_if_fail(rectangle != NULL);
rp = (GdkRegionPrivate *)region;
XClipBox(rp->xregion, &r);
rectangle->x = r.x;
rectangle->y = r.y;
rectangle->width = r.width;
rectangle->height = r.height;
}
gboolean
gdk_region_point_in (GdkRegion *region,
gint x,
......
......@@ -82,6 +82,25 @@ gdk_region_equal (GdkRegion *region1,
return XEqualRegion (private1->xregion, private2->xregion);
}
void
gdk_region_get_clipbox(GdkRegion *region,
GdkRectangle *rectangle)
{
GdkRegionPrivate *rp;
XRectangle r;
g_return_if_fail(region != NULL);
g_return_if_fail(rectangle != NULL);
rp = (GdkRegionPrivate *)region;
XClipBox(rp->xregion, &r);
rectangle->x = r.x;
rectangle->y = r.y;
rectangle->width = r.width;
rectangle->height = r.height;
}
gboolean
gdk_region_point_in (GdkRegion *region,
gint x,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment