Miter joins of rectangles with tiny height aren't rendered

Migrated from https://bugs.launchpad.net/inkscape/+bug/168957

Steps to reproduce:

  • open badmiterlimit_new.svg
  • select the only object
  • open fill and stroke dialog
  • in the stroke style tab, change the join type to round, bevel, and miter
  • (observe rendering of the ends of the path)

To see how zoom and height affect this

  • open badmiterlimit.svg, which shows more examples of these rectangles with differing thickness (example file taken from launchpad issue)
  • zoom in and out
  • (observe some paths being rendered with or without the join at different zoom levels)

What happened?

  • For miter and bevel joins, the joins aren't rendered
  • Appearance depends on zoom factor, and how small the height actually is (per https://bugs.launchpad.net/inkscape/+bug/168957/comments/8)
    • some zooms show the correct rendering, some don't
    • stroke to path converts to wrong appearance too (but effect there is not dependent on zoom)
  • Inconsistent behaviour between printing, pdf/png export and Inkscape display

What should have happened?

  • For all joins, the stroke should extend the whole width of the canvas
    • no change in behaviour even when stroke-miterlimit is set to 1000 or other large values
  • Printing, pdf/png/other exports will have differing behaviour based on resolution, etc.
  • Different renderers display it differently, e.g. firefox renders the joins, xviewer (rsvg?) does not.

Sample attachments:

Version Info:

  • 1.1-dev (3ee125b4ad, 2020-10-26) Linux Mint 20
  • Inkscape 0.92pre1 15073 (GTK3) Arch
  • 0.92.x rev. 15044 (inkscape@74b8d7e2), Windows XP
  • Various tests on launchpad (I believe these displayed Entwurd1.svg in Inkscape correctly, but not on export)
    • Inkscape 0.45.1, built Mar 21 2007, Windows XP
    • 0.48.5 Windows XP
    • 0.91 Windows XP (problems at higher zooms)
    • r11859 (inkscape@75e147ea) (cairo 1.11.2), Windows XP
  • On 2012-11-12, jazzynico comments

    Also affects the trunk versions of Inkscape (with cairo rendering) Reproduced on XP with revision 11859 [inkscape@75e147ea] (cairo 1.11.2) and 11871 [inkscape@0516dc2e] (cairo 1.12.8, local test).

  • vonHalenbach (lustik) wrote on 2007-12-22: replicated SVN 16763. I exported the attached svg to cairo pdf. But i seem to have an old version of cairo installed. My cairo is 1.4.2 i don't know if this is relevant.
Edited by Nathan Lee
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information