{"json_modified": "2016-08-30T08:03:52.774195", "uuid": "27de5bac-e75f-4645-9f08-6f04f65f5f0f", "title": "CanvasRenderingContext2D.textAlign", "url": "/en-US/docs/Web/API/CanvasRenderingContext2D/textAlign", "tags": ["Canvas", "API", "Reference", "Property", "R\u00e9f\u00e9rence", "CanvasRenderingContext2D"], "translations": [{"uuid": "273d6cab-8bd0-4e81-a602-73485382faa0", "title": "CanvasRenderingContext2D.textAlign", "url": "/ja/docs/Web/API/CanvasRenderingContext2D/textAlign", "tags": ["Canvas", "API", "Reference", "Property", "R\u00e9f\u00e9rence", "CanvasRenderingContext2D", "canvas"], "summary": "Canvas 2D API \u306e CanvasRenderingContext2D.textAlign \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u3092\u63cf\u753b\u3059\u308b\u3068\u304d\u306b\u7528\u3044\u3089\u308c\u308b\u73fe\u5728\u306e\u30c6\u30ad\u30b9\u30c8\u914d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002CanvasRenderingContext2D.fillText \u30e1\u30bd\u30c3\u30c9\u306e x \u306e\u5024\u306b\u57fa\u3065\u3044\u3066\u914d\u7f6e\u3055\u308c\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5f93\u3063\u3066 textAlign=\"center\" \u306f\u3001\u30c6\u30ad\u30b9\u30c8\u3092 x-50%*width \u306e\u4f4d\u7f6e\u304b\u3089\u63cf\u753b\u3057\u307e\u3059\u3002", "localization_tags": [], "locale": "ja", "last_edit": "2016-08-30T08:03:47", "review_tags": []}, {"uuid": "af379d5e-7e6a-46d1-86a7-18715bae4abe", "title": "CanvasRenderingContext2D.textAlign", "url": "/zh-CN/docs/Web/API/CanvasRenderingContext2D/textAlign", "tags": [], "summary": "CanvasRenderingContext2D.textAlign \u662f Canvas 2D API \u63cf\u8ff0\u7ed8\u5236\u6587\u672c\u65f6\uff0c\u6587\u672c\u7684\u5bf9\u9f50\u65b9\u5f0f\u7684\u5c5e\u6027\u3002\u6ce8\u610f\uff0c\u8be5\u5bf9\u9f50\u662f\u57fa\u4e8eCanvasRenderingContext2D.fillText\u65b9\u6cd5\u7684x\u7684\u503c\u3002\u6240\u4ee5\u5982\u679ctextAlign=\"center\"\uff0c\u90a3\u4e48\u8be5\u6587\u672c\u5c06\u753b\u5728 x-50%*width\u3002", "localization_tags": [], "locale": "zh-CN", "last_edit": "2016-08-09T03:16:12", "review_tags": []}], "modified": "2016-02-02T03:39:56", "label": "CanvasRenderingContext2D.textAlign", "localization_tags": [], "locale": "en-US", "id": 129819, "last_edit": "2015-04-12T21:22:02", "summary": "The CanvasRenderingContext2D.textAlign property of the Canvas 2D API specifies the current text alignment being used when drawing text. Beware that the alignment is base on the x value of the CanvasRenderingContext2D.fillText method. So\u00a0if textAlign=\"center\", then the text would be drawn at x-50%*width.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntax", "title": "Syntax"}, {"id": "Options", "title": "Options"}, {"id": "Examples", "title": "Examples"}, {"id": "Using_the_textAlign_property", "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/textAlign", "review_tags": []}