Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • extensions extensions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 87
    • Issues 87
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • InkscapeInkscape
  • extensionsextensions
  • Issues
  • #454
Closed
Open
Issue created Feb 24, 2022 by Steven Baltakatei Sandoval@baltakatei

Convert to dashes bug if stroke-dasharray has 0

Summary:

If the first value in stroke-dasharray is 0 such as when drawing a line of dots (e.g. stroke-dasharray:0,1), then the 'Extensions -> Modify path -> Convert to dashes' operation fails to convert each dot into a subpath.

Steps to reproduce:

  • Open Inkscape
  • Draw dotted line
    • Draw line segment (B, click two points, Enter)
    • Open 'Object -> Fill and Stroke -> Stroke style'
    • Select the first dashed line in 'Dashes'
    • Change 'Pattern' from 1 1 to 0 4
    • Change 'Cap' from 'Butt Cap' to 'Round Cap'
  • Convert each dot into a subpath
    • Open 'Extensions -> Modify path -> Convert to dashes'

What happened?

Dotted line segment disappears completely in both Inkscape's GUI and in exported PDFs. XML Editor shows the path object exists with some subpath info but nothing is displayed. Note: Firefox 91.6.0esr still displays the line segment.

What should have happened?

The dotted line segment should have stayed visible.

A kludgey workaround I found is to change the 0 to something small but non-zero (e.g. in 'Stroke style -> Pattern', change 0 4 to 0.01 4).

example example-failed example-kludge
example example-failed example-kludge
Example state before Convert to dashes Convert to dashes result Convert do dashes result if using 0 4 -> 0.01 4 kludge
example.svg, example.pdf example-failed.svg, example-failed.pdf example-kludge.svg, example-kludge.pdf

Note: I have encountered several instances of Inkscape importing .eps files from academic sources with stroke-dasharray containing 0 values for dotted lines. I suspect there is a divide-by-zero error in extensions/convert2dashes.py when parsing stroke-dasharray values. This bug could be ignored if you argue a dot can't technically be made a path since paths need at least two points, but I'd argue a normal user shouldn't be expected to care too much about this difference; I still think it's a bug.

Version info

Inkscape 1.2-alpha1 (9465ba4, 2022-02-23)

    GLib version:     2.64.6
    GTK version:      3.24.20
    glibmm version:   2.64.2
    gtkmm version:    3.24.2
    libxml2 version:  2.9.10
    libxslt version:  1.1.34
    Cairo version:    1.17.4
    Pango version:    1.44.7
    HarfBuzz version: 2.6.4

    OS version:       Debian GNU/Linux 10 (buster)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking