Announcement

Collapse
No announcement yet.

Can't draw a dashed line in Inkscape

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't draw a dashed line in Inkscape

    Using Inkscape in Kubuntu as long as I have installed this O.S.
    I tried for the very first time to draw a dashed line:
    1. select the already drawn solid line
    2. Object > Fill and Stroke
    3. Stroke style: Dashes and choosing a dashed line.
    Then I expect it will change from solid to dashed but nothing happens.
    Also trying to draw a new dashed line which is also impossible, but I can draw a new solid line.
    What am I doing wrong or which setting to I have to change?
    I am using Inkscape version 1.2
    every help is welcome.

    #2
    Warning: This is a Google AI answer. As with any AI generated response, a dose of healthy skepticism is warranted.

    AI Overview


    In Inkscape 1.2 on Kubuntu 24.04, when a dashed line continues to render as a solid straight line despite selecting a dash pattern, it is usually caused by one of three common issues: an oversized stroke width, an accidental Live Path Effect override, or a localized system rendering bug (frequent in older versions packaged via snap or apt on newer Ubuntu bases).

    1. Fix the Stroke Width Scaling (Most Common)
    Inkscape calculates the length of dashes and gaps relative to the Stroke width. If your stroke width is incredibly thick or your dash pattern choice is highly tightly wound, the dashes may bleed into each other and display as a continuous solid block. [1]
    • Select the line with the Select tool (S).
    • Go to the Stroke style tab.
    • Look at the Width setting. If it is very high (e.g., 20px), reduce it significantly (try 1px or 2px) to see if the gaps appear.
    • Alternatively, change the Dashes drop-down to a broader pattern with wider spacing (e.g., dash-dash or a larger multiplier). [1, 2, 3, 4]

    2. Remove Overriding Path Effects

    If you used certain Live Path Effects (LPE), Inkscape 1.2 can sometimes conflict and bypass the standard stroke styling. [1]
    • Select your object.
    • Go to the top menu and select Path > Path Effects.
    • Check the right-hand panel. If there is a Dashed Stroke effect or another geometry modifier active that has locked parameters, click the "-" (minus) icon to remove it and revert back to standard standard stroke formatting. [1]

    3. Check for a Broken Custom Dash Array

    If your standard pattern selection accidentally got altered into a "Custom" array, it might be evaluating a blank space property.
    • Select the line and press Ctrl + Shift + X to open the XML Editor.
    • In the XML tree, click on the highlighted <path> or <line> element.
    • Look at the attributes panel on the right for the style string.
    • Find the stroke-dasharray entry. If it says something flat like none or an single number like 5 instead of pairs (e.g., 5,5), it won't render a pattern. You can manually edit it to 5, 5 and hit Ctrl + Enter to force test a clean dashed line. [1, 2]

    4. Kubuntu / Linux Specific Workaround

    Because Kubuntu 24.04 utilizes newer graphics stacks than what Inkscape 1.2 was built for, flatpack/snap wrapper layers sometimes introduce display rendering regressions.
    • Try changing the Display Mode: Go to View > Display Mode and toggle between Normal, No Filters, and Visible Hairlines to see if the dashes return.
    • Consider Upgrading: Inkscape 1.2 is a few generations old. Upgrading via the official stable PPA or Flatpak directly solves several theme/rendering engine conflicts tied to Ubuntu 24.04: bash


      sudo add-apt-repository ppa:inkscape.dev/stable sudo apt update sudo apt install inkscape


      Use code with caution.
    Slava Ukraini! πŸ‡ΊπŸ‡¦
    Windows no longer obstruct my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes​

    Comment


      #3
      First check that the line has a stroke applied.

      Select the line, open Ctrl+Shift+F, go to Stroke paint, choose Flat color, and select a colour.

      Then open Stroke style, choose Dashes, and select the required dash pattern. The line should change immediately.

      For a new line, draw it first and make sure it has a coloured stroke before selecting the dash pattern.

      If it still does not work, post a screenshot of the Fill and Stroke panel with the line selected.
      ​
      ▁ β–‚ β–„ β–… β–† β–‡ β–ˆ α„‚IПЦX FΣ¨Π― α„‚IFΞ£ β–ˆ β–‡ β–† β–… β–„ β–‚ ▁

      Comment

      Users Viewing This Topic

      Collapse

      There are 0 users viewing this topic.

      Working...
      X