Closed Bug 1208712 Opened 10 years ago Closed 10 years ago

Incorrect code snippet explaining

Categories

(Developer Documentation Graveyard :: API: HTML, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: l1aqus, Unassigned)

References

()

Details

:: Developer Documentation Request Request Type: Correction Gecko Version: unspecified Technical Contact: :: Details In Lines section of Drawing Shapes Canvas API Tutorial[1] the code snippet explanation states > This starts by calling beginPath() to start a new shape path. But "beginPath" method is never called in corresponding code snippet, it creates "Path2D" objects instead. That's why that code snippet OR it's explanation needs a correction. [1] https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes#Lines
Code snippets in "Arcs" and "Bezier and quadratic curves" sections of the same page use "Path2D" too, but "Path2D" is actually introduced later in the page. And it is stated in the "Arcs" section > For each arc, we start a new path by calling beginPath(). Which is incorrect. So I think that the code snippets are to be corrected.
Thank you very much for this report. I have reverted the changes that put Path2D objects into these examples. They are indeed only introduced later in the article, and shouldn't be used before.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.