Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polyline draw error !Index was outside the bounds of the array #888

Closed
comepeng opened this issue Sep 1, 2021 · 3 comments · Fixed by #892
Closed

polyline draw error !Index was outside the bounds of the array #888

comepeng opened this issue Sep 1, 2021 · 3 comments · Fixed by #892
Labels

Comments

@comepeng
Copy link

comepeng commented Sep 1, 2021

Description

Index was outside arrary boundary

Example data

svg:

<svg baseProfile="full" height="100%" version="1.1" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <marker id="arrow" markerHeight="10" markerUnits="strokeWidth" markerWidth="10" orient="auto" refX="0" refY="3"> <path d="M0,0 L0,6 L9,3 z" fill="#000000" /> </marker> <marker id="id159" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> <marker id="id160" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> <marker id="id161" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> <marker id="id162" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> </defs> <line marker-end="url(#arrow)" stroke="#000000" stroke-width="1" x1="103.75" x2="337.5" y1="122.25" y2="122.25" /> <polyline fill="none" marker-end="url(#id159)" marker-mid="url(#id159)" marker-start="url(#id159)" points="259.5,121.75" stroke="black" /> <polyline fill="none" marker-end="url(#id160)" marker-mid="url(#id160)" marker-start="url(#id160)" points="140.5,122" stroke="black" /> <polyline fill="none" marker-end="url(#id161)" marker-mid="url(#id161)" marker-start="url(#id161)" points="173,122" stroke="black" /> <polyline fill="none" marker-end="url(#id162)" marker-mid="url(#id162)" marker-start="url(#id162)" points="292,122" stroke="black" /> <text class="xt" style="font-size:14px" x="285" y="136.25">C</text> <text class="xt" style="font-size:14px" x="164.5" y="120.25">A</text> <text class="xt" style="font-size:14px" x="250" y="136.25">b</text> <text class="xt" style="font-size:14px" x="166" y="136.25">a</text> <text class="xt" style="font-size:14px" x="135.5" y="120.25">D</text> <text class="xt" style="font-size:14px" x="254.5" y="120.25">B</text> <text class="xt" style="font-size:14px" x="134.5" y="136.25">d</text> <text class="xt" style="font-size:14px" x="288.5" y="120.25">C</text> </svg>

Used Versions

SVG 3.23

@mrbean-bremen
Copy link
Member

Please provide some meaningful description to the issue.

@mrbean-bremen
Copy link
Member

I could not reproduce the mentioned error - please add what you did, and a callstack if available.

@comepeng
Copy link
Author

comepeng commented Sep 3, 2021

My SVG code is as follows:<svg baseProfile="full" height="100%" version="1.1" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <marker id="arrow" markerHeight="10" markerUnits="strokeWidth" markerWidth="10" orient="auto" refX="0" refY="3"> <path d="M0,0 L0,6 L9,3 z" fill="#000000" /> </marker> <marker id="id159" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> <marker id="id160" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> <marker id="id161" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> <marker id="id162" markerHeight="4" markerWidth="4" refX="0" refY="0" viewBox="-5,-5,10,10"> <circle cx="0" cy="0" fill="black" fill-opacity="6" r="5" /> </marker> </defs> <line marker-end="url(#arrow)" stroke="#000000" stroke-width="1" x1="103.75" x2="337.5" y1="122.25" y2="122.25" /> <polyline fill="none" marker-end="url(#id159)" marker-mid="url(#id159)" marker-start="url(#id159)" points="259.5,121.75" stroke="black" /> <polyline fill="none" marker-end="url(#id160)" marker-mid="url(#id160)" marker-start="url(#id160)" points="140.5,122" stroke="black" /> <polyline fill="none" marker-end="url(#id161)" marker-mid="url(#id161)" marker-start="url(#id161)" points="173,122" stroke="black" /> <polyline fill="none" marker-end="url(#id162)" marker-mid="url(#id162)" marker-start="url(#id162)" points="292,122" stroke="black" /> <text class="xt" style="font-size:14px" x="285" y="136.25">C</text> <text class="xt" style="font-size:14px" x="164.5" y="120.25">A</text> <text class="xt" style="font-size:14px" x="250" y="136.25">b</text> <text class="xt" style="font-size:14px" x="166" y="136.25">a</text> <text class="xt" style="font-size:14px" x="135.5" y="120.25">D</text> <text class="xt" style="font-size:14px" x="254.5" y="120.25">B</text> <text class="xt" style="font-size:14px" x="134.5" y="136.25">d</text> <text class="xt" style="font-size:14px" x="288.5" y="120.25">C</text> </svg>

The results rendered through the browser are as follows:
test
The result rendered by SVG is as follows:
test
You can see two more points

H1Gdev added a commit to H1Gdev/SVG that referenced this issue Sep 4, 2021
mrbean-bremen pushed a commit that referenced this issue Sep 4, 2021
* Fixes #888 'polyline draw error !Index was outside the bounds of the array' issue
* Add test
* Update ReleaseNotes.md
github-actions bot pushed a commit that referenced this issue Sep 4, 2021
…s CONTRIBUTING.md Generators Nuget README.md Samples Source Tests doc docfx.json index.md license.txt Fixes #888 'polyline draw error !Index was outside the bounds of the array' issue
 BuildProcessTemplates CONTRIBUTING.md Generators Nuget README.md Samples Source Tests doc docfx.json index.md license.txt Add test
 BuildProcessTemplates CONTRIBUTING.md Generators Nuget README.md Samples Source Tests doc docfx.json index.md license.txt Update ReleaseNotes.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants