SVG <path> `C/c` command doesn't work when the points are positioned at four corners of rectangle.
Reported by
anseki....@gmail.com,
May 29 2016
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0 Example URL: https://jsfiddle.net/c41zv45w/ Steps to reproduce the problem: This very simple path is not shown. <svg version="1.1"> <path id="path" d="M0,0 C200,200 0,200 200,0" fill="none" stroke-width="10" stroke="red"/> </svg> What is the expected behavior? It is shown. What went wrong? This very simple path is not shown. <svg version="1.1"> <path id="path" d="M0,0 C200,200 0,200 200,0" fill="none" stroke-width="10" stroke="red"/> </svg> https://jsfiddle.net/c41zv45w/ When four points of Cubic Bezier that are p0, p1, p2, p3 are positioned at four corners of rectangle (crossing p1 and p2), it is not shown. If a point is moved 1px, it is shown (second example). And, when those are positioned at four corners of trapezoid or three corners of triangle, it is shown (example 7, 8, 9). Then, only example 2, 7, 8 and 9 are shown. In Firefox and IE, all are shown. Does it occur on multiple sites: Yes Is it a problem with a plugin? N/A Did this work before? N/A Does this work in other browsers? Yes Chrome version: 51.0.2704.63 Channel: n/a OS Version: 6.3 Flash Version: 21.0.0.242
,
May 30 2016
Firefox renders all the paths while Chrome fails to render half of them. Added path data labels to test case: https://jsfiddle.net/vmh8gLva/ Triaging as SVG though perhaps this is a Skia issue?
,
May 30 2016
Seems to reproduce in a Skia fiddle: https://fiddle.skia.org/c/349260a0bbe0fa7dc97ce3162358ba52
,
May 31 2016
,
May 31 2016
This cubic happens to have its inflection point exactly at its cusp. The normal for the cubic can't be directly computed there, so the drawing gives up. Subdividing the cubic at the cusp permits computing a normal. Working on it.
,
Jun 1 2016
The following revision refers to this bug: https://skia.googlesource.com/skia.git/+/ba150cc283301a28693a18d4aa9d14b1a1616ab3 commit ba150cc283301a28693a18d4aa9d14b1a1616ab3 Author: caryclark <caryclark@google.com> Date: Wed Jun 01 11:42:02 2016 always compute a cubic tangent If the inflection of a cubic is also the cusp, the tangent is degenerate at that t when computed directly. Rather than giving up, subdivide the curve there and use the computed control points to compute the tangent. This strategy also removes the error paths where the tangent formerly could not be computed. R=reed@google.com BUG= 615686 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2020293002 Review-Url: https://codereview.chromium.org/2020293002 [add] https://crrev.com/ba150cc283301a28693a18d4aa9d14b1a1616ab3/gm/bug615686.cpp [modify] https://crrev.com/ba150cc283301a28693a18d4aa9d14b1a1616ab3/src/core/SkStroke.cpp
,
Jun 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/65750950fb9d15eced6e988072d1b205109dda7b commit 65750950fb9d15eced6e988072d1b205109dda7b Author: skia-deps-roller <skia-deps-roller@chromium.org> Date: Wed Jun 01 12:54:29 2016 Roll src/third_party/skia/ 276e63361..ba150cc28 (1 commit). https://chromium.googlesource.com/skia.git/+log/276e63361c73..ba150cc28330 $ git log 276e63361..ba150cc28 --date=short --no-merges --format='%ad %ae %s' 2016-06-01 caryclark always compute a cubic tangent BUG= 615686 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel TBR=herb@google.com Review-Url: https://codereview.chromium.org/2026023003 Cr-Commit-Position: refs/heads/master@{#397116} [modify] https://crrev.com/65750950fb9d15eced6e988072d1b205109dda7b/DEPS
,
Jun 2 2016
,
May 30 2018
Choosing Transform-Perspective-Real and grabbing the circle around the center of the area, most of the image disappear.
,
May 31 2018
brucewang@, what url or test case are you referring to? |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by anseki....@gmail.com
, May 29 2016