diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-05-02 23:29:24 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2005-05-02 23:29:24 +0000 |
commit | 788bbf520a8c62f7798cb032228434ac7da39ada (patch) | |
tree | 6c6d244362bce12b25c5e252af4f8133327f7182 /gtk/gtkstyle.c | |
parent | b1cebb4c50256b2ed3c4b2167ab84dac6eb834c3 (diff) | |
download | gtk+-788bbf520a8c62f7798cb032228434ac7da39ada.tar.gz |
Add a draw-border style property to allow themes to draw outside the
2005-04-28 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Add a draw-border style property to allow
themes to draw outside the widget's allocation.
* gdk/gdkwindow.c gtk/gtkstyle.c: Remove some save/restore pairs
that were working around the clip-leakage bug in Cairo.
* gtk/gtkstyle.c: Use cairo_fill_preserve() rathe than
save/fill/restore.
* gdk/gdkgc.c gdk/gdkinternals.h: Add _gdk_gc_update_context()
That updates a Cairo context to match a GC.
* gdk/gdkdraw.c: Use _gdk_gc_update_context() to add support
for tiles/stipples/clipping to gdk_draw_glyphs(),
gdk_draw_trapezoids().
* gdk/gdkpango.c: Use _gdk_gc_update_context() instead of internal
implementation of stipples. Use one cairo_t across the entire
drawing operation. Replace cairo_matrix_create() with
stack-allocated matrices.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c: Save various aspects of the
GC state (fill, tile, stipple, foreground, background, clip region)
in instance-private-data for future use. Add getters.
Get rid of _gdk_windowing_gc_get_foreground() function implemented
by the backends.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Add
_gdk_gc_init() to do initial setup of the GC from values;
fixes some problems from drawable redirection.
* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Move
gdk_gc_copy() and gdk_gc_set_clip_{region,rectangle}() into
the generic code, add _gdk_windowing_gc_copy(),
_gdk_windowing_gc_set_clip_region() to do backend specific
stuff.
* gdk/x11/{gdkprivate-x11.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
gdk/win32/{gdkprivate-win32.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
gdk/linux-fb/{gdkprivate-fb.h,gdkgc-fb.c.c,gdkdrawable-fb.c}:
Don't duplicate state that now is stored by the generic code.
* gdk/gdk.symbols Update
Diffstat (limited to 'gtk/gtkstyle.c')
-rw-r--r-- | gtk/gtkstyle.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index 10fb2f7e26..7452c52e88 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -2905,7 +2905,6 @@ draw_arrow (GdkWindow *window, if (area) { - cairo_save (cr); cairo_rectangle (cr, area->x, area->y, area->width, area->height); cairo_clip (cr); cairo_new_path (cr); @@ -2939,9 +2938,6 @@ draw_arrow (GdkWindow *window, cairo_close_path (cr); cairo_fill (cr); - if (area) - cairo_restore (cr); - cairo_destroy (cr); } @@ -3631,7 +3627,6 @@ gtk_default_draw_check (GtkStyle *style, if (area) { - cairo_save (cr); cairo_rectangle (cr, area->x, area->y, area->width, area->height); cairo_clip (cr); cairo_new_path (cr); @@ -3726,9 +3721,6 @@ gtk_default_draw_check (GtkStyle *style, cairo_fill (cr); } - if (area) - cairo_restore (cr); - cairo_destroy (cr); } @@ -3759,7 +3751,6 @@ gtk_default_draw_option (GtkStyle *style, if (area) { - cairo_save (cr); cairo_rectangle (cr, area->x, area->y, area->width, area->height); cairo_clip (cr); cairo_new_path (cr); @@ -3784,9 +3775,7 @@ gtk_default_draw_option (GtkStyle *style, (exterior_size - 1) / 2., 0, 2 * G_PI); - cairo_save (cr); - cairo_fill (cr); - cairo_restore (cr); + cairo_fill_preserve (cr); if (type == BUTTON) gdk_cairo_set_source_color (cr, &style->fg[state_type]); @@ -3853,9 +3842,6 @@ gtk_default_draw_option (GtkStyle *style, cairo_fill (cr); } - if (area) - cairo_restore (cr); - cairo_destroy (cr); } @@ -4811,7 +4797,6 @@ gtk_default_draw_expander (GtkStyle *style, if (area) { - cairo_save (cr); cairo_rectangle (cr, area->x, area->y, area->width, area->height); cairo_clip (cr); cairo_new_path (cr); @@ -4888,7 +4873,6 @@ gtk_default_draw_expander (GtkStyle *style, cairo_set_line_width (cr, line_width); - cairo_save (cr); if (state_type == GTK_STATE_PRELIGHT) gdk_cairo_set_source_color (cr, &style->fg[GTK_STATE_PRELIGHT]); @@ -4899,15 +4883,11 @@ gtk_default_draw_expander (GtkStyle *style, gdk_cairo_set_source_color (cr, &style->base[GTK_STATE_NORMAL]); - cairo_fill (cr); - cairo_restore (cr); + cairo_fill_preserve (cr); gdk_cairo_set_source_color (cr, &style->fg[state_type]); cairo_stroke (cr); - if (area) - cairo_restore (cr); - cairo_destroy (cr); } |