summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-01-25 01:57:43 -0500
committerMatthias Clasen <mclasen@redhat.com>2022-01-25 15:31:25 -0500
commit342a0265b3992925105d04b1ef22cda6a7fa8786 (patch)
treea994c22dcf7ecd6402d390ddad599f821428c7b6 /utils
parent61e192f6c1edcec694c38ef07f4ec9ff9af01cdc (diff)
downloadpango-342a0265b3992925105d04b1ef22cda6a7fa8786.tar.gz
Rename PangoLayoutIter to PangoLineIter
Diffstat (limited to 'utils')
-rw-r--r--utils/viewer-pangocairo.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c
index 631c2a7d..6293e086 100644
--- a/utils/viewer-pangocairo.c
+++ b/utils/viewer-pangocairo.c
@@ -202,7 +202,7 @@ render_callback (PangoLayout *layout,
cairo_pattern_t *pattern;
PangoRectangle ink, logical;
double lw = cairo_get_line_width (cr);
- PangoLayoutIter *iter;
+ PangoLineIter *iter;
pango_lines_get_extents (pango_layout_get_lines (layout), &ink, &logical);
@@ -282,10 +282,10 @@ render_callback (PangoLayout *layout,
iter = pango_layout_get_iter (layout);
do
{
- PangoLine *line = pango_layout_iter_get_line (iter);
+ PangoLine *line = pango_line_iter_get_line (iter);
double width = (double)logical.width / PANGO_SCALE;
- y = pango_layout_iter_get_line_baseline (iter);
+ y = pango_line_iter_get_line_baseline (iter);
cairo_save (cr);
cairo_translate (cr,
(double)logical.x / PANGO_SCALE + width * 0.5,
@@ -303,8 +303,8 @@ render_callback (PangoLayout *layout,
cairo_fill (cr);
cairo_restore (cr);
}
- while (pango_layout_iter_next_line (iter));
- pango_layout_iter_free (iter);
+ while (pango_line_iter_next_line (iter));
+ pango_line_iter_free (iter);
cairo_restore (cr);
}
@@ -345,7 +345,7 @@ render_callback (PangoLayout *layout,
{
PangoRectangle rect;
- pango_layout_iter_get_line_extents (iter, NULL, &rect);
+ pango_line_iter_get_line_extents (iter, NULL, &rect);
cairo_rectangle (cr,
(double)rect.x / PANGO_SCALE - lw / 2,
(double)rect.y / PANGO_SCALE - lw / 2,
@@ -353,8 +353,8 @@ render_callback (PangoLayout *layout,
(double)rect.height / PANGO_SCALE + lw);
cairo_stroke (cr);
}
- while (pango_layout_iter_next_line (iter));
- pango_layout_iter_free (iter);
+ while (pango_line_iter_next_line (iter));
+ pango_line_iter_free (iter);
cairo_restore (cr);
}
@@ -370,11 +370,11 @@ render_callback (PangoLayout *layout,
PangoRun *run;
PangoRectangle rect;
- run = pango_layout_iter_get_run (iter);
+ run = pango_line_iter_get_run (iter);
if (!run)
continue;
- pango_layout_iter_get_run_extents (iter, NULL, &rect);
+ pango_line_iter_get_run_extents (iter, NULL, &rect);
cairo_rectangle (cr,
(double)rect.x / PANGO_SCALE - lw / 2,
(double)rect.y / PANGO_SCALE - lw / 2,
@@ -382,8 +382,8 @@ render_callback (PangoLayout *layout,
(double)rect.height / PANGO_SCALE + lw);
cairo_stroke (cr);
}
- while (pango_layout_iter_next_run (iter));
- pango_layout_iter_free (iter);
+ while (pango_line_iter_next_run (iter));
+ pango_line_iter_free (iter);
cairo_restore (cr);
}
@@ -398,7 +398,7 @@ render_callback (PangoLayout *layout,
{
PangoRectangle rect;
- pango_layout_iter_get_cluster_extents (iter, NULL, &rect);
+ pango_line_iter_get_cluster_extents (iter, NULL, &rect);
cairo_rectangle (cr,
(double)rect.x / PANGO_SCALE - lw / 2,
(double)rect.y / PANGO_SCALE - lw / 2,
@@ -406,8 +406,8 @@ render_callback (PangoLayout *layout,
(double)rect.height / PANGO_SCALE + lw);
cairo_stroke (cr);
}
- while (pango_layout_iter_next_cluster (iter));
- pango_layout_iter_free (iter);
+ while (pango_line_iter_next_cluster (iter));
+ pango_line_iter_free (iter);
cairo_restore (cr);
}
@@ -422,7 +422,7 @@ render_callback (PangoLayout *layout,
{
PangoRectangle rect;
- pango_layout_iter_get_char_extents (iter, &rect);
+ pango_line_iter_get_char_extents (iter, &rect);
cairo_rectangle (cr,
(double)rect.x / PANGO_SCALE - lw / 2,
(double)rect.y / PANGO_SCALE - lw / 2,
@@ -430,8 +430,8 @@ render_callback (PangoLayout *layout,
(double)rect.height / PANGO_SCALE + lw);
cairo_stroke (cr);
}
- while (pango_layout_iter_next_cluster (iter));
- pango_layout_iter_free (iter);
+ while (pango_line_iter_next_cluster (iter));
+ pango_line_iter_free (iter);
cairo_restore (cr);
}
@@ -450,17 +450,17 @@ render_callback (PangoLayout *layout,
PangoRectangle rect;
int x_pos, y_pos;
- run = pango_layout_iter_get_run (iter);
+ run = pango_line_iter_get_run (iter);
if (!run)
continue;
item = pango_run_get_item (run);
glyphs = pango_run_get_glyphs (run);
- pango_layout_iter_get_run_extents (iter, NULL, &rect);
+ pango_line_iter_get_run_extents (iter, NULL, &rect);
x_pos = rect.x;
- y_pos = pango_layout_iter_get_run_baseline (iter);
+ y_pos = pango_line_iter_get_run_baseline (iter);
for (int i = 0; i < glyphs->num_glyphs; i++)
{
@@ -491,8 +491,8 @@ render_callback (PangoLayout *layout,
x_pos += glyphs->glyphs[i].geometry.width;
}
}
- while (pango_layout_iter_next_run (iter));
- pango_layout_iter_free (iter);
+ while (pango_line_iter_next_run (iter));
+ pango_line_iter_free (iter);
cairo_restore (cr);
}
@@ -520,8 +520,8 @@ render_callback (PangoLayout *layout,
int x, y;
gboolean trailing;
- pango_layout_iter_get_run_extents (iter, NULL, &rect);
- run = pango_layout_iter_get_run (iter);
+ pango_line_iter_get_run_extents (iter, NULL, &rect);
+ run = pango_line_iter_get_run (iter);
if (!run)
continue;
@@ -534,7 +534,7 @@ render_callback (PangoLayout *layout,
offset = g_utf8_strlen (text, start - text);
- y = pango_layout_iter_get_run_baseline (iter);
+ y = pango_line_iter_get_run_baseline (iter);
trailing = FALSE;
p = start;
@@ -574,8 +574,8 @@ render_callback (PangoLayout *layout,
}
}
- while (pango_layout_iter_next_run (iter));
- pango_layout_iter_free (iter);
+ while (pango_line_iter_next_run (iter));
+ pango_line_iter_free (iter);
cairo_restore (cr);
}