Add a function to get affected area for background

The new function, gtk_render_background_get_clip answers the
question: what pixels are affected if I call gtk_render_background ?

The long-term goal is to have APIs that answer this question for
all rendering primitives.
This commit is contained in:
Matthias Clasen
2016-01-20 09:41:01 -05:00
parent b2eaed62f6
commit 5fd7b85d2b
3 changed files with 43 additions and 0 deletions

View File

@ -59,6 +59,15 @@ void gtk_render_background (GtkStyleContext *context,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_3_20
void gtk_render_background_get_clip (GtkStyleContext *context,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GdkRectangle *out_clip);
GDK_AVAILABLE_IN_ALL
void gtk_render_frame (GtkStyleContext *context,
cairo_t *cr,