From 82cbe9c9958440bc84a9614c0593a336b020e505 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 22 Feb 2019 17:45:00 -0800 Subject: [PATCH] cairo: Don't adjust grid point size We shouldn't adjust the pixel size of the grid based on alignment in GAL. This creates artifacts on the screen at different zoom levels. The pixel width is fixed by grid size preference Also clean a left-over debug statement Fixes: lp:1817377 * https://bugs.launchpad.net/kicad/+bug/1817377 --- common/gal/cairo/cairo_gal.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index f5c6ac11bf..2a09fce474 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -922,7 +922,6 @@ void CAIRO_GAL_BASE::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& auto p0 = roundp( xform( aStartPoint ) ); auto p1 = roundp( xform( aEndPoint ) ); - printf("Line Width: %f\n", lineWidth); cairo_set_source_rgba( currentContext, gridColor.r, gridColor.g, gridColor.b, gridColor.a ); cairo_move_to( currentContext, p0.x, p0.y ); cairo_line_to( currentContext, p1.x, p1.y ); @@ -953,7 +952,7 @@ void CAIRO_GAL_BASE::drawGridCross( const VECTOR2D& aPoint ) void CAIRO_GAL_BASE::drawGridPoint( const VECTOR2D& aPoint, double aSize ) { auto p = roundp( xform( aPoint ) ); - auto s = ::roundp( xform( aSize / 2.0 ) ); + auto s = xform( aSize / 2.0 ); cairo_set_source_rgba( currentContext, gridColor.r, gridColor.g, gridColor.b, gridColor.a ); cairo_move_to( currentContext, p.x, p.y );