From 703bcbf3868b1270076cdba6d7383b37048e544b Mon Sep 17 00:00:00 2001 From: vng Date: Thu, 23 Jan 2014 16:43:13 +0300 Subject: [PATCH] Experimental: Avoid additional linear style for casing in the line endings. --- src/libkomwm.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/libkomwm.py b/src/libkomwm.py index 4606e6a..62074db 100644 --- a/src/libkomwm.py +++ b/src/libkomwm.py @@ -177,16 +177,18 @@ def komap_mapswithme(options, style, filename): dr_line.cap = dr_linecaps.get(st.get('casing-linecap', 'butt'), BUTTCAP) dr_line.join = dr_linejoins.get(st.get('casing-linejoin', 'round'), ROUNDJOIN) dr_element.lines.extend([dr_line]) - if st.get('casing-linecap', st.get('linecap', 'round')) != 'butt': - dr_line = LineRuleProto() - dr_line.width = (st.get('width', 0) * WIDTH_SCALE) + (st.get('casing-width') * WIDTH_SCALE * 2) - dr_line.color = mwm_encode_color(st, "casing") - dr_line.priority = -15000 - dashes = st.get('casing-dashes', st.get('dashes', [])) - dr_line.dashdot.dd.extend(dashes) - dr_line.cap = dr_linecaps.get(st.get('casing-linecap', 'round'), ROUNDCAP) - dr_line.join = dr_linejoins.get(st.get('casing-linejoin', 'round'), ROUNDJOIN) - dr_element.lines.extend([dr_line]) + +# Let's try without this additional line style overhead. Needed only for casing in road endings. + # if st.get('casing-linecap', st.get('linecap', 'round')) != 'butt': + # dr_line = LineRuleProto() + # dr_line.width = (st.get('width', 0) * WIDTH_SCALE) + (st.get('casing-width') * WIDTH_SCALE * 2) + # dr_line.color = mwm_encode_color(st, "casing") + # dr_line.priority = -15000 + # dashes = st.get('casing-dashes', st.get('dashes', [])) + # dr_line.dashdot.dd.extend(dashes) + # dr_line.cap = dr_linecaps.get(st.get('casing-linecap', 'round'), ROUNDCAP) + # dr_line.join = dr_linejoins.get(st.get('casing-linejoin', 'round'), ROUNDJOIN) + # dr_element.lines.extend([dr_line]) if st.get('width'): dr_line = LineRuleProto()