summaryrefslogtreecommitdiff
path: root/pango/pangocairo-render.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-31 21:05:42 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-03-31 21:05:42 +0000
commitcc8ac2a10360027b334db8e4b237207540004ae7 (patch)
treecefb099aba71c769dca55b54d5b87a54faf8db6b /pango/pangocairo-render.c
parent1fedc11aa03d95e4e365f01796ecceca8b0acd0e (diff)
downloadpango-cc8ac2a10360027b334db8e4b237207540004ae7.tar.gz
Revert "Merge branch 'fix-deadlocks' into 'master'"revert-1fedc11a
This reverts merge request !309
Diffstat (limited to 'pango/pangocairo-render.c')
-rw-r--r--pango/pangocairo-render.c84
1 files changed, 0 insertions, 84 deletions
diff --git a/pango/pangocairo-render.c b/pango/pangocairo-render.c
index c5ca74e3..9e3cfab8 100644
--- a/pango/pangocairo-render.c
+++ b/pango/pangocairo-render.c
@@ -809,89 +809,6 @@ pango_cairo_renderer_draw_shape (PangoRenderer *renderer,
}
static void
-pango_cairo_renderer_draw_line (PangoRenderer *renderer,
- PangoRenderPart part,
- PangoRenderLineStyle style,
- int x,
- int y,
- int width,
- int height)
-{
- PangoCairoRenderer *crenderer = (PangoCairoRenderer *) (renderer);
-
- if (!crenderer->do_path)
- {
- cairo_save (crenderer->cr);
-
- set_color (crenderer, part);
- }
-
- switch (style)
- {
- case PANGO_RENDER_LINE_SOLID:
- cairo_rectangle (crenderer->cr,
- crenderer->x_offset + (double)x / PANGO_SCALE,
- crenderer->y_offset + (double)y / PANGO_SCALE,
- (double)width / PANGO_SCALE,
- (double)height / PANGO_SCALE);
- break;
-
- case PANGO_RENDER_LINE_DOTTED:
- {
- double radius;
- double xc, yc;
- double xend;
-
- radius = MIN (width, height) / (2.0 * PANGO_SCALE);
- xc = crenderer->x_offset + (double)x / PANGO_SCALE + radius;
- yc = crenderer->y_offset + (double)y / PANGO_SCALE + radius;
- xend = xc + (double)width / PANGO_SCALE;
-
- while (xc + radius <= xend)
- {
- cairo_new_sub_path (crenderer->cr);
- cairo_arc (crenderer->cr, xc, yc, radius, 0, 2 * M_PI);
- cairo_close_path (crenderer->cr);
- xc += 3 * radius;
- }
- }
- break;
-
- case PANGO_RENDER_LINE_DASHED:
- {
- double xr, yr;
- double w, h;
- double d;
- double xend;
-
- xr = crenderer->x_offset + (double)x / PANGO_SCALE;
- yr = crenderer->y_offset + (double)y / PANGO_SCALE;
- xend = xr + (double)width / PANGO_SCALE;
-
- h = MIN (width, height) / (double) PANGO_SCALE;
- w = 5 * h;
- d = 9 * h;
-
- while (xr <= xend)
- {
- cairo_rectangle (crenderer->cr, xr, yr, MIN (w, xend - xr), h);
- xr += d;
- }
- }
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- if (!crenderer->do_path)
- {
- cairo_fill (crenderer->cr);
- cairo_restore (crenderer->cr);
- }
-}
-
-static void
pango_cairo_renderer_init (PangoCairoRenderer *renderer G_GNUC_UNUSED)
{
}
@@ -907,7 +824,6 @@ pango_cairo_renderer_class_init (PangoCairoRendererClass *klass)
renderer_class->draw_trapezoid = pango_cairo_renderer_draw_trapezoid;
renderer_class->draw_error_underline = pango_cairo_renderer_draw_error_underline;
renderer_class->draw_shape = pango_cairo_renderer_draw_shape;
- renderer_class->draw_line = pango_cairo_renderer_draw_line;
}
static PangoCairoRenderer *cached_renderer = NULL; /* MT-safe */