diff options
-rw-r--r-- | frontends/cocoa/plotter.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/frontends/cocoa/plotter.m b/frontends/cocoa/plotter.m index 1e01a47b0..f91167701 100644 --- a/frontends/cocoa/plotter.m +++ b/frontends/cocoa/plotter.m @@ -84,7 +84,7 @@ static nserror plot_line(const struct redraw_context *ctx, const plot_style_t *p [path lineToPoint:cocoa_point(line->x1, line->y1)]; cocoa_plot_path_set_stroke_pattern(path, pstyle); - const bool horizontal = y0 == y1; + const bool horizontal = line->y0 == line->y1; const bool vertical = line->x0 == line->x1; const bool oddThickness = pstyle->stroke_width != 0 ? (pstyle->stroke_width % 2) != 0 : true; @@ -319,10 +319,9 @@ static CGFloat cocoa_half_pixel; void cocoa_update_scale_factor(void) { - const CGFloat scale = [[NSScreen mainScreen] backingScaleFactor]; - cocoa_scale_factor = scale == 1.0 ? 1.0 : 1.0 / scale; + cocoa_scale_factor = 1.0; cocoa_half_pixel = 0.5 * cocoa_scale_factor; - browser_set_dpi(points_per_inch * scale); + browser_set_dpi(points_per_inch); } static inline void cocoa_center_pixel(bool x, bool y) |