Tuesday, July 24, 2012
I was testing HTML5 export, and tried exporting the default file (currently a simple ellipse). Nothing was showing up in Chrome, so I did a bit of hunting around. I tried drawing lines, which all showed up. I finally figured out that bezierCurveTo was not working, because lineTo commands in the same place worked fine. Then, it occurred to me to try another browser, and I discovered it ran just fine in Firefox and Opera. But why wasn't bezierCurveTo working in Chrome? I did a bit of Googling and found out that this is actually a bug in Chrome, which crops up when curves begin and end on the same point. I added the fix mentioned in the Stack Overflow post, and here's where things get a bit weirder: the ellipse now shows up, but only the fill. Nothing will persuade Chrome to actually stroke the curves around the edges. The Chrome team seems to be ignoring the bug report, and I don't want to slow HTML5 drawing down any further by constructing the Beziers out of lines, so I'm just going to leave this one in for now. Outlines will show up as long as shapes have straight edges, but for ellipses you'll need another browser - or Flash, which of course Chrome comes bundled with by default, and which has no problems with curves.