geda-gaf: Add patch to fix rendering with dashed lines (from upstream)
[minipack.git] / patches / geda-gaf / 03-fix-dashed-line-rendering.patch
blob83454c574cfc335c665effb18f3379a7bfb5f381
1 From a7c7e96e17937ea0780261101a4c45383df71134 Mon Sep 17 00:00:00 2001
2 From: Werner Hoch <werner.ho@gmx.de>
3 Date: Sun, 18 Oct 2009 23:03:23 +0100
4 Subject: [PATCH] gschem: Fix rendering with zoomed out dashed lines. Bug #2876373
6 Rather than using SCREENabs, use the screen_width function to
7 determine the on-screen size of dash elements. This clamps the
8 width at a rendereable size, so cairo does not get tripped into
9 an error state (and stop drawing other objects on the schematic).
10 ---
11 gschem/src/gschem_cairo.c | 4 ++--
12 1 files changed, 2 insertions(+), 2 deletions(-)
14 diff --git a/gschem/src/gschem_cairo.c b/gschem/src/gschem_cairo.c
15 index e9a8e5c..2e7882d 100644
16 --- a/gschem/src/gschem_cairo.c
17 +++ b/gschem/src/gschem_cairo.c
18 @@ -292,8 +292,8 @@ void gschem_cairo_stroke (GSCHEM_TOPLEVEL *w_current, int line_type, int line_en
19 int width, length, space;
21 width = screen_width (w_current, wwidth);
22 - length = SCREENabs (w_current, wlength);
23 - space = SCREENabs (w_current, wspace);
24 + length = screen_width (w_current, wlength);
25 + space = screen_width (w_current, wspace);
26 offset = ((width % 2) == 0) ? 0 : 0.5;
28 cairo_set_line_width (w_current->cr, width);
29 --
30 1.6.5