diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-20 23:59:44 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 15:29:16 -0500 |
commit | 45762d6b50b29447ee97c759c7a7cc55cb534703 (patch) | |
tree | b3f45c39f4a9d68f03130dd8527f51fc50ef719a /pango/pangoft2-render.c | |
parent | 33eb81450f8572762a5b805cf0bb4740c86f45cf (diff) | |
download | pango-45762d6b50b29447ee97c759c7a7cc55cb534703.tar.gz |
The big rename of doom
simple layout -> layout
line iter -> layout iter
line -> layout line
This commit replaces the old PangoLayout implementation
with PangoSimpleLayout, and does all the necessary
cleanups.
Diffstat (limited to 'pango/pangoft2-render.c')
-rw-r--r-- | pango/pangoft2-render.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/pango/pangoft2-render.c b/pango/pangoft2-render.c index f2da8e7f..902f7d6f 100644 --- a/pango/pangoft2-render.c +++ b/pango/pangoft2-render.c @@ -26,6 +26,7 @@ #include "pango-font-private.h" #include "pangoft2-private.h" #include "pango-impl-utils.h" +#include "pango-layout-line-private.h" /* for compatibility with older freetype versions */ #ifndef FT_LOAD_TARGET_MONO @@ -613,7 +614,7 @@ pango_ft2_render_layout_subpixel (FT_Bitmap *bitmap, pango_ft2_renderer_set_bitmap (PANGO_FT2_RENDERER (renderer), bitmap); - pango_renderer_draw_layout (renderer, layout, x, y); + pango_renderer_draw_lines (renderer, pango_layout_get_lines (layout), x, y); } /** @@ -653,19 +654,17 @@ pango_ft2_render_layout (FT_Bitmap *bitmap, */ void pango_ft2_render_layout_line_subpixel (FT_Bitmap *bitmap, - PangoLayoutLine *line, - int x, - int y) + PangoLayoutLine *line, + int x, + int y) { - PangoContext *context; PangoFontMap *fontmap; PangoRenderer *renderer; g_return_if_fail (bitmap != NULL); g_return_if_fail (line != NULL); - context = pango_layout_get_context (line->layout); - fontmap = pango_context_get_font_map (context); + fontmap = pango_context_get_font_map (line->context); renderer = _pango_ft2_font_map_get_renderer (PANGO_FT2_FONT_MAP (fontmap)); pango_ft2_renderer_set_bitmap (PANGO_FT2_RENDERER (renderer), bitmap); @@ -683,10 +682,10 @@ pango_ft2_render_layout_line_subpixel (FT_Bitmap *bitmap, * Render a `PangoLayoutLine` onto a FreeType2 bitmap */ void -pango_ft2_render_layout_line (FT_Bitmap *bitmap, - PangoLayoutLine *line, - int x, - int y) +pango_ft2_render_layout_line (FT_Bitmap *bitmap, + PangoLayoutLine *line, + int x, + int y) { pango_ft2_render_layout_line_subpixel (bitmap, line, x * PANGO_SCALE, y * PANGO_SCALE); } |