{"json_modified": "2016-03-28T08:38:27.282294", "uuid": "37e38e32-cdb2-4b83-b0e5-7b34cd5b8b4b", "title": "CanvasRenderingContext2D.closePath()", "url": "/en-US/docs/Web/API/CanvasRenderingContext2D/closePath", "tags": ["Canvas", "API", "Reference", "R\u00e9f\u00e9rence", "CanvasRenderingContext2D", "Method"], "translations": [{"uuid": "5e97aa4a-3e72-4b56-83ce-62af9eb8e9c9", "title": "CanvasRenderingContext2D.closePath()", "url": "/zh-CN/docs/Web/API/CanvasRenderingContext2D/closePath", "tags": [], "summary": "CanvasRenderingContext2D
.closePath()
\u662f Canvas 2D API \u5c06\u7b14\u70b9\u8fd4\u56de\u5230\u5f53\u524d\u5b50\u8def\u5f84\u8d77\u59cb\u70b9\u7684\u65b9\u6cd5\u3002\u5b83\u5c1d\u8bd5\u4ece\u5f53\u524d\u70b9\u5230\u8d77\u59cb\u70b9\u7ed8\u5236\u4e00\u6761\u76f4\u7ebf\u3002 \u5982\u679c\u56fe\u5f62\u5df2\u7ecf\u662f\u5c01\u95ed\u7684\u6216\u8005\u53ea\u6709\u4e00\u4e2a\u70b9\uff0c\u90a3\u4e48\u6b64\u65b9\u6cd5\u4e0d\u4f1a\u505a\u4efb\u4f55\u64cd\u4f5c\u3002", "localization_tags": [], "locale": "zh-CN", "last_edit": "2015-06-08T00:57:22", "review_tags": []}], "modified": "2016-02-02T03:41:07", "label": "CanvasRenderingContext2D.closePath()", "localization_tags": [], "locale": "en-US", "id": 128585, "last_edit": "2015-05-08T09:58:54", "summary": "The CanvasRenderingContext2D
.closePath()
method of the Canvas 2D API causes the point of the pen to move back to the start of the current sub-path. It tries to add a straight line (but does not actually draw it)\u00a0from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntax", "title": "Syntax"}, {"id": "Examples", "title": "Examples"}, {"id": "Using_the_closePath_method", "title": "Using the "}, {"id": "HTML", "title": "HTML"}, {"id": "JavaScript", "title": "JavaScript"}, {"id": "Playable_code", "title": "Playable code"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "slug": "Web/API/CanvasRenderingContext2D/closePath", "review_tags": []}