Export to HTML5 Canvas: Last Edge is Missing

Bug #1757053 reported by Gabriel Chung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Using the "Save As" > "HTML 5 Canvas (*.html)", the exported html includes shapes that are with their last edge missing.

I think the problem is because of the parsePath() function in simplepath.py module.

A super quick fix for ONLY straight line for the last edge is adding the following:

svg.py in the extension folder:

Starting line 307:

for pt in path:
    comm, data = pt
    if comm in path_command:
        path_command[comm](data)

#Custom Code:
# Close drawing
tmp_comm, start_pt = path[0]
self.pathLineTo(start_pt)

self.ctx.closePath()

Revision history for this message
Gabriel Chung (gabrielchung) wrote :
Revision history for this message
Gabriel Chung (gabrielchung) wrote :

I forgot to mention that the original file is an .ai file from Adobe Illustrator.

Revision history for this message
Alvin Penner (apenner) wrote :

thank you for taking the time to issue a report.

- problem reproduced on Windows 10, Inkscape 0.92.3pre0 (f5a6572, 2018-03-03) using the attached svg file

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Alvin Penner (apenner) wrote :

the problem can also be reproduced by a normal path, not a star. attached is an svg file which shows the same problem. In this case the path has been closed using a 'z' command rather than explicitly drawing the last line.

Revision history for this message
Gabriel Chung (gabrielchung) wrote : Re: [Bug 1757053] Re: Export to HTML5 Canvas: Last Edge is Missing

Thanks.

I will try to find a solution if possible later.

Best regards,
Gabriel Chung

________________________________
From: <email address hidden> <email address hidden> on behalf of Alvin Penner <email address hidden>
Sent: Tuesday, March 20, 2018 7:08:08 PM
To: <email address hidden>
Subject: [Bug 1757053] Re: Export to HTML5 Canvas: Last Edge is Missing

the problem can also be reproduced by a normal path, not a star.
attached is an svg file which shows the same problem. In this case the
path has been closed using a 'z' command rather than explicitly drawing
the last line.

** Attachment added: "quad.svg"
   https://bugs.launchpad.net/inkscape/+bug/1757053/+attachment/5084855/+files/quad.svg

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1757053

Title:
  Export to HTML5 Canvas: Last Edge is Missing

Status in Inkscape:
  Confirmed

Bug description:
  Using the "Save As" > "HTML 5 Canvas (*.html)", the exported html
  includes shapes that are with their last edge missing.

  I think the problem is because of the parsePath() function in
  simplepath.py module.

  A super quick fix for ONLY straight line for the last edge is adding
  the following:

  svg.py in the extension folder:

  Starting line 307:

  for pt in path:
      comm, data = pt
      if comm in path_command:
          path_command[comm](data)

  #Custom Code:
  # Close drawing
  tmp_comm, start_pt = path[0]
  self.pathLineTo(start_pt)

  self.ctx.closePath()

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/1757053/+subscriptions

tags: added: bug-migration
Revision history for this message
Edouard Choinière (echoix) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new
bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/-/issues/4377
Closed by: https://gitlab.com/echoix

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.