Author Topic: Inkscape not displaying path accepted by other SVG viewers  (Read 1190 times)

September 13, 2018, 06:08:50 AM
Read 1190 times

taijim

  • Sr. Newbie

  • Offline
  • **

  • 2
  • Gender
    Male

    Male
Using Inkscape 0.92 and Ubuntu 17.04

I have imported a hand coded "yinyang emblem" SVG file into Inkscape and find that an included path is not displayed in the Inkscape work space, although it is displayed as I expect in every other file viewer that I have tested.
When all other code is removed from the file, leaving only the problem path, other programs show the expected "yin" symbol from the yinyang emblem, but  Inkscape shows a blank page.
The file with the problem path isolated is as follows
<?xml version="1.0" standalone="no"?>
<svg  version = "1.1"
 xmlns="http://www.w3.org/2000/svg"
 baseProfile="full"
 width="100" height="100"
 viewbox="0 0 100 100"
 preserveAspectRatio="xMidYMid slice">

 <g id="yinyang" >

// yin shape - left half-circle underneath right half-circle joined by a larger right half circle
<path class="yin" fill="black" d="
M50 50
a 24.5 24.5, 0 0 0, 0 49

a 24.5 24.5,  0 0 0, 0 -49
a 49 49, 0 0 01, 0 98  "
/>

</g>

</svg>

edit - removed one line of "commented out" code
edit 2 -
I  thought this might be related to the problem reported at
https://forum.inkscapecommunity.com/index.php?topic=889.0
but that SVG file displays correctly in my version of Inkscape (0.92)
« Last Edit: September 13, 2018, 09:03:33 PM by taijim »
  • 0.92
  • Ubuntu 17.04

September 14, 2018, 06:01:52 AM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
The comment isn't using XML syntax. Use <!-- comment --> instead.
Firefox shows a black circle in the file, just like Inkscape. What are you expecting to see?

September 15, 2018, 03:35:35 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I have an open, black-filled circular path with unset stroke, in Inkscape.  But something strange.  When I select with Selection tool, the status bar says "Path 2 nodes....".  But when I switch to the Node tool, it actually has 5 nodes. 

Possibly there's something not quite right with the code.  But I don't know XML/SVG well enough to say what that might be.

I guess the object could be part of the yin symbol.  Is it possible you didn't copy all the right code?  It's hard to know, without seeing the whole file.  You're welcome to share the whole file, if you like.  It's probably more convenient for us if you attach the SVG file, rather than paste the code into your message.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 16, 2018, 12:08:38 PM
Reply #3

taijim

  • Sr. Newbie

  • Offline
  • **

  • 2
  • Gender
    Male

    Male
@brynn - My intention was to create a complete yinyang symbol, but I only posted the yin part  because that is where the problem seemed to lie.
@Moini - You were right, my use of the single line comment with // is not valid in SVG and different software was handling in in different ways, some just ignoring the incorrectly commented line and others getting completely confused (not surprisingly) ) :)
I had also in my first edit, incorrectly removed some valid code instead of just a comment.

After removing the comments, the results still varied, so I started again, rewriting  a different path for the complete yinyang symbol  and now the result is what I intended in the first place. and seems consistent with the software (viewers and browsers) that I have checked.

I will attach the corrected file and consider the problem solved.
I thank you for your assistance !! :2tu:
« Last Edit: September 17, 2018, 04:41:58 AM by taijim »
  • 0.92
  • Ubuntu 17.04

September 17, 2018, 05:15:03 PM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln