From 66493421e65d8cbda3e17fdbe43824387e3d51a7 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 23 May 2018 13:04:19 +0100 Subject: Plotters: Change stroke width in the plot_style_t to fixed point. --- frontends/windows/plot.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'frontends/windows') diff --git a/frontends/windows/plot.c b/frontends/windows/plot.c index 3668e4bb6..60b175a6b 100644 --- a/frontends/windows/plot.c +++ b/frontends/windows/plot.c @@ -601,7 +601,9 @@ line(const struct redraw_context *ctx, (style->stroke_type == PLOT_OP_TYPE_DASH) ? PS_DASH: 0); LOGBRUSH lb = {BS_SOLID, col, 0}; - HPEN pen = ExtCreatePen(penstyle, style->stroke_width, &lb, 0, NULL); + HPEN pen = ExtCreatePen(penstyle, + plot_style_fixed_to_int(style->stroke_width), + &lb, 0, NULL); if (pen == NULL) { DeleteObject(clipregion); return NSERROR_INVALID; @@ -672,7 +674,9 @@ rectangle(const struct redraw_context *ctx, if (style->fill_type == PLOT_OP_TYPE_NONE) lb1.lbStyle = BS_HOLLOW; - HPEN pen = ExtCreatePen(penstyle, style->stroke_width, &lb, 0, NULL); + HPEN pen = ExtCreatePen(penstyle, + plot_style_fixed_to_int(style->stroke_width), + &lb, 0, NULL); if (pen == NULL) { return NSERROR_INVALID; } -- cgit v1.2.3