summaryrefslogtreecommitdiff
path: root/pango/mapping.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-01-17 23:00:18 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-01-17 23:00:18 +0000
commit620fb9ffc8ce07446ab341630e37900d7c9c102b (patch)
treef6924b9416bfc734615e47403069b091b8bde7cf /pango/mapping.c
parent08be81c00f4fce735979e6a684eeade00c1ce328 (diff)
downloadpango-620fb9ffc8ce07446ab341630e37900d7c9c102b.tar.gz
Switch GlyphStrings to have a single array of PangoGlyphInfo instead of
Sat Jan 15 03:17:35 2000 Owen Taylor <otaylor@redhat.com> * pango/glyphstring.c pango/mapping.c pango/pangox.c modules/basic.c examples/viewer.c: Switch GlyphStrings to have a single array of PangoGlyphInfo instead of multiple arrays. Rename PangoGlyphIndex to PangoGlyph.
Diffstat (limited to 'pango/mapping.c')
-rw-r--r--pango/mapping.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/pango/mapping.c b/pango/mapping.c
index bd0cb3de..470b2085 100644
--- a/pango/mapping.c
+++ b/pango/mapping.c
@@ -48,13 +48,13 @@
*/
void
-pango_cp_to_x (gchar *text,
- gint length,
- PangoAnalysis *analysis,
- PangoGlyphString *glyphs,
- gint char_pos,
- gboolean trailing,
- gint *x_pos)
+pango_cp_to_x (gchar *text,
+ gint length,
+ PangoAnalysis *analysis,
+ PangoGlyphString *glyphs,
+ gint char_pos,
+ gboolean trailing,
+ gint *x_pos)
{
gint i;
gint start_xpos = 0;
@@ -83,7 +83,7 @@ pango_cp_to_x (gchar *text,
if (analysis->level % 2) /* Right to left */
{
for (i = glyphs->num_glyphs - 1; i >= 0; i--)
- width += glyphs->geometry[i].width;
+ width += glyphs->glyphs[i].geometry.width;
for (i = glyphs->num_glyphs - 1; i >= 0; i--)
{
@@ -100,7 +100,7 @@ pango_cp_to_x (gchar *text,
start_xpos = width;
}
- width -= glyphs->geometry[i].width;
+ width -= glyphs->glyphs[i].geometry.width;
}
}
else /* Left to right */
@@ -120,7 +120,7 @@ pango_cp_to_x (gchar *text,
start_xpos = width;
}
- width += glyphs->geometry[i].width;
+ width += glyphs->glyphs[i].geometry.width;
}
}
@@ -190,7 +190,7 @@ pango_x_to_cp (gchar *text,
if (analysis->level % 2) /* Right to left */
{
for (i = glyphs->num_glyphs - 1; i >= 0; i--)
- width += glyphs->geometry[i].width;
+ width += glyphs->glyphs[i].geometry.width;
for (i = glyphs->num_glyphs - 1; i >= 0; i--)
{
@@ -209,9 +209,9 @@ pango_x_to_cp (gchar *text,
}
}
- width -= glyphs->geometry[i].width;
+ width -= glyphs->glyphs[i].geometry.width;
- if (width <= x_pos && x_pos < width + glyphs->geometry[i].width)
+ if (width <= x_pos && x_pos < width + glyphs->glyphs[i].geometry.width)
found = TRUE;
}
}
@@ -234,10 +234,10 @@ pango_x_to_cp (gchar *text,
}
}
- if (width <= x_pos && x_pos < width + glyphs->geometry[i].width)
+ if (width <= x_pos && x_pos < width + glyphs->glyphs[i].geometry.width)
found = TRUE;
- width += glyphs->geometry[i].width;
+ width += glyphs->glyphs[i].geometry.width;
}
}