summaryrefslogtreecommitdiff
path: root/gdk/gdkpango.c
diff options
context:
space:
mode:
authorElliot Lee <sopwith@src.gnome.org>2000-08-03 20:15:37 +0000
committerElliot Lee <sopwith@src.gnome.org>2000-08-03 20:15:37 +0000
commit98f8f4d229072ed0b5444e45e1e98e5b40853689 (patch)
tree9a42814904b9838628efc636ad037abdb05176f1 /gdk/gdkpango.c
parent96e4699c30f0bb3d93f92d87d3f9cc7fb7835610 (diff)
downloadgtk+-98f8f4d229072ed0b5444e45e1e98e5b40853689.tar.gz
Don't draw runs with a PANGO_ATTR_SHAPE set.
* gdk/gdkpango.c (gdk_draw_layout_line): Don't draw runs with a PANGO_ATTR_SHAPE set.
Diffstat (limited to 'gdk/gdkpango.c')
-rw-r--r--gdk/gdkpango.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index 85655e302d..029ba9a537 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -36,7 +36,8 @@ static void gdk_pango_get_item_properties (PangoItem *item,
PangoAttrColor *fg_color,
gboolean *fg_set,
PangoAttrColor *bg_color,
- gboolean *bg_set);
+ gboolean *bg_set,
+ gboolean *shape_set);
static void
gdk_pango_context_destroy (GdkPangoContextInfo *info)
@@ -168,17 +169,12 @@ gdk_draw_layout_line (GdkDrawable *drawable,
PangoUnderline uline = PANGO_UNDERLINE_NONE;
PangoLayoutRun *run = tmp_list->data;
PangoAttrColor fg_color, bg_color;
- gboolean fg_set, bg_set;
+ gboolean fg_set, bg_set, shape_set;
GdkGC *fg_gc;
tmp_list = tmp_list->next;
- gdk_pango_get_item_properties (run->item, &uline, &fg_color, &fg_set, &bg_color, &bg_set);
-
- if (fg_set)
- fg_gc = gdk_pango_get_gc (context, &fg_color, gc);
- else
- fg_gc = gc;
+ gdk_pango_get_item_properties (run->item, &uline, &fg_color, &fg_set, &bg_color, &bg_set, &shape_set);
if (uline == PANGO_UNDERLINE_NONE)
pango_glyph_string_extents (run->glyphs, run->item->analysis.font,
@@ -200,8 +196,16 @@ gdk_draw_layout_line (GdkDrawable *drawable,
gdk_pango_free_gc (context, bg_gc);
}
+ if (shape_set)
+ continue;
+
+ if (fg_set)
+ fg_gc = gdk_pango_get_gc (context, &fg_color, gc);
+ else
+ fg_gc = gc;
+
gdk_draw_glyphs (drawable, fg_gc, run->item->analysis.font,
- x + x_off / PANGO_SCALE, y, run->glyphs);
+ x + x_off / PANGO_SCALE, y, run->glyphs);
switch (uline)
{
@@ -323,7 +327,8 @@ gdk_pango_get_item_properties (PangoItem *item,
PangoAttrColor *fg_color,
gboolean *fg_set,
PangoAttrColor *bg_color,
- gboolean *bg_set)
+ gboolean *bg_set,
+ gboolean *shape_set)
{
GSList *tmp_list = item->extra_attrs;
@@ -332,6 +337,9 @@ gdk_pango_get_item_properties (PangoItem *item,
if (bg_set)
*bg_set = FALSE;
+
+ if (shape_set)
+ *shape_set = FALSE;
while (tmp_list)
{
@@ -359,6 +367,11 @@ gdk_pango_get_item_properties (PangoItem *item,
*bg_set = TRUE;
break;
+
+ case PANGO_ATTR_SHAPE:
+ if (shape_set)
+ *shape_set = TRUE;
+ break;
default:
break;