{"json_modified": "2016-10-10T23:03:30.611448", "uuid": "53030d67-009b-449e-ad87-2d783cd2a736", "title": "CanvasRenderingContext2D.createPattern()", "url": "/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern", "tags": ["Canvas", "Reference", "CanvasRenderingContext2D", "API", "Method"], "translations": [{"uuid": "453e0bfe-f69a-4a36-94c6-3ec8bb1f2008", "title": "CanvasRenderingContext2D.createPattern()", "url": "/zh-CN/docs/Web/API/CanvasRenderingContext2D/createPattern", "tags": [], "summary": "CanvasRenderingContext2D
.createPattern()\u00a0
\u662f\u00a0Canvas 2D API\u00a0\u4f7f\u7528\u6307\u5b9a\u7684\u56fe\u50cf\u00a0(CanvasImageSource
)\u521b\u5efa\u6a21\u5f0f\u7684\u65b9\u6cd5\u3002 \u5b83\u901a\u8fc7repetition\u53c2\u6570\u5728\u6307\u5b9a\u7684\u65b9\u5411\u4e0a\u91cd\u590d\u5143\u56fe\u50cf\u3002\u6b64\u65b9\u6cd5\u8fd4\u56de\u4e00\u4e2aCanvasPattern
\u5bf9\u8c61\u3002", "localization_tags": [], "locale": "zh-CN", "last_edit": "2015-06-08T00:59:09", "review_tags": []}], "modified": "2016-10-10T23:03:30", "label": "CanvasRenderingContext2D.createPattern()", "localization_tags": [], "locale": "en-US", "id": 128739, "last_edit": "2015-07-16T10:04:38", "summary": "The CanvasRenderingContext2D
.createPattern()
method of the Canvas 2D API creates a pattern using the specified image (a CanvasImageSource
). It repeats the source in the directions specified by the repetition argument. This method returns a CanvasPattern
.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntax", "title": "Syntax"}, {"id": "Parameters", "title": "Parameters"}, {"id": "Return_value", "title": "Return value"}, {"id": "Examples", "title": "Examples"}, {"id": "Using_the_createPattern_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": "Compatibility_notes", "title": "Compatibility notes"}, {"id": "See_also", "title": "See also"}], "slug": "Web/API/CanvasRenderingContext2D/createPattern", "review_tags": []}