Two bugs relating to line patterns
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
David Mathog |
Bug Description
Here are two bugs relating to the handling of dash patterns on lines. This turned up on imports from EMF files but it is an unrelated Inkscape issue. The bug is present in a recent trunk and release 0.48.2. and on Windows and Linux.
In brief:
1. Some patterns are not recognized when the path is selected and the fill/stroke point/stroke style dialog is open. The solid
line pattern is shown, even when the pattern in the line corresponds to a standard one (here 3,1). It appears that this happens
for patterns less than 1 pixel in width, but I have not thoroughly explored the input space to be sure something else isn't
going on.
2. Some line patterns are converted to solid lines, without the user intending that, by doing:
1. select line with pattern
2. click on "stroke paint" in dialog
3. click on "stroke style" in dialog
but not
2'. click on "stroke style" in dialog
3'. click on "stroke paint" in dialog
nor
1. set dialog to "stroke style" tab
2. select line with pattern
No change is intended, but one is applied anyway. The really bizarre thing about this one is that it is a function of the width (see tables below). .3751 does this (as do many, many other widths), but it isn't a number of digits issue, as both .375 and .3750 act the same.
path color width miter ends
2884 red 0.375 8 round
2885 green 0.3751 8 round
2886 blue 0.3750 4 butt
2887 black 1 4 butt
2888 black 1 8 round
Tests
A dash pattern recognized
B select click stroke paint, click stroke style converts to solid
path A B
2884 N N
2885 N Y
2886 N N
2887 Y N
2888 Y N
Related branches
- Martin Owens: Approve (merge)
-
Diff: 48503 lines (+46736/-372) (has conflicts)83 files modifiedpackaging/win32/languages/Hebrew.nsh (+113/-0)
po/POTFILES.in (+2/-1)
share/extensions/Makefile.am (+1/-0)
share/extensions/fontfix.conf (+55/-0)
share/extensions/hershey.inx (+86/-0)
share/extensions/hershey.py (+109/-0)
share/extensions/hersheydata.py (+58/-0)
share/extensions/render_gear_rack.inx (+21/-0)
share/extensions/render_gear_rack.py (+105/-0)
share/extensions/text_merge.inx (+34/-0)
share/extensions/text_merge.py (+199/-0)
src/2geom/generic-rect.h (+1/-1)
src/Makefile.am (+5/-4)
src/attributes-test.h (+3/-0)
src/attributes.cpp (+3/-0)
src/attributes.h (+4/-1)
src/display/drawing-context.h (+15/-0)
src/display/drawing-text.cpp (+286/-16)
src/display/drawing-text.h (+12/-3)
src/display/nr-style.cpp (+58/-0)
src/display/nr-style.h (+37/-0)
src/extension/CMakeLists.txt (+11/-4)
src/extension/init.cpp (+9/-9)
src/extension/internal/Makefile_insert (+20/-4)
src/extension/internal/emf-inout.cpp (+3549/-0)
src/extension/internal/emf-inout.h (+211/-0)
src/extension/internal/emf-print.cpp (+2202/-0)
src/extension/internal/emf-print.h (+138/-0)
src/extension/internal/emf-win32-inout.h (+0/-57)
src/extension/internal/text_reassemble.c (+2884/-0)
src/extension/internal/text_reassemble.h (+386/-0)
src/extension/internal/uemf.c (+5523/-0)
src/extension/internal/uemf.h (+2889/-0)
src/extension/internal/uemf_endian.c (+1783/-0)
src/extension/internal/uemf_endian.h (+37/-0)
src/extension/internal/uemf_print.c (+2358/-0)
src/extension/internal/uemf_print.h (+169/-0)
src/extension/internal/uemf_utf.c (+552/-0)
src/extension/internal/uemf_utf.h (+53/-0)
src/extension/internal/uwmf.c (+6880/-0)
src/extension/internal/uwmf.h (+2492/-0)
src/extension/internal/uwmf_endian.c (+1772/-0)
src/extension/internal/uwmf_endian.h (+39/-0)
src/extension/internal/uwmf_print.c (+1616/-0)
src/extension/internal/uwmf_print.h (+48/-0)
src/extension/internal/wmf-inout.cpp (+3235/-0)
src/extension/internal/wmf-inout.h (+213/-0)
src/extension/internal/wmf-print.cpp (+1994/-0)
src/extension/internal/wmf-print.h (+147/-0)
src/helper/action-context.cpp (+84/-0)
src/helper/action-context.h (+89/-0)
src/helper/geom.cpp (+310/-0)
src/helper/geom.h (+5/-0)
src/layer-model.cpp (+259/-0)
src/layer-model.h (+104/-0)
src/libnrtype/FontInstance.cpp (+35/-0)
src/libnrtype/Layout-TNG-Compute.cpp (+172/-62)
src/libnrtype/Layout-TNG-Output.cpp (+264/-50)
src/libnrtype/Layout-TNG.h (+4/-0)
src/libnrtype/font-instance.h (+2/-0)
src/libunicode-convert/Makefile_insert (+5/-0)
src/libunicode-convert/README (+1/-0)
src/libunicode-convert/makefile.in (+17/-0)
src/libunicode-convert/unicode-convert.c (+1008/-0)
src/libunicode-convert/unicode-convert.h (+51/-0)
src/splivarot.cpp (+280/-0)
src/splivarot.h (+2/-0)
src/style.cpp (+306/-88)
src/style.h (+49/-6)
src/text-editing.cpp (+38/-20)
src/ui/dialog/new-from-template.cpp (+59/-0)
src/ui/dialog/new-from-template.h (+39/-0)
src/ui/dialog/template-load-tab.cpp (+281/-0)
src/ui/dialog/template-load-tab.h (+102/-0)
src/ui/dialog/template-widget.cpp (+117/-0)
src/ui/dialog/template-widget.h (+48/-0)
src/ui/widget/unit-tracker.cpp (+263/-0)
src/ui/widget/unit-tracker.h (+74/-0)
src/widgets/connector-toolbar.cpp (+3/-0)
src/widgets/dash-selector.cpp (+75/-11)
src/widgets/dash-selector.h (+5/-0)
src/widgets/eraser-toolbar.cpp (+168/-0)
src/widgets/eraser-toolbar.h (+0/-35)
Changed in inkscape: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → David Mathog (mathog) |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
For the conversion problem it varies in some strange way as a function of width:
These do not convert (dashes to solid): 0.5, 1.0, 2.0, 5.0
These do: 0.51, 1.01, 2.01, 5.01
For dash pattern being recognized here are some observations, which don't make
a lot of sense to me. Perhaps the person who wrote that bit of code can explain what is going on?
width dash shows as (S)olid line or (D)ash pattern
1 3,1 D
1 3,2 S
0.5 3,2 S
0.5 3,1 D
0.5 1,3 D
0.5 2,3 S
2.0 1,3 S
1 1,3 D
5 1,3 S
5 6,7 S