gdk_region_get_clipbox() lets you get a rectangle around the region.
gdk_region_get_clipbox() lets you get a rectangle around the region.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user