텍스트 컨텍스트
- fillText (text, x, y, maxWidth) -> 주어진 x, y위치에 텍스트를 채움
- strokeText (text, x, y, maxWidth) -> 주어진 위치에 외곽선 텍스트를 생성
- font = value (10px sans-serif)
- textAlign = start / end / left / right / center
- textBaseline = top / bottom / hanging / middle / alphabetic / ideographic
- direction = ltr / rtl / inherit
텍스트 측정
- measureText() -> 해당 텍스트의 너비, 픽셀 등 정보를 포함하는 객체를 리턴.
'웹표준 > 2D,3D Graphics and Effects(그래픽효과)' 카테고리의 다른 글
4. SVG (Scalable Vector Graphics) (0) | 2020.03.27 |
---|---|
3. WebG (0) | 2020.03.27 |
1_2. <canvas> 스타일 (0) | 2020.03.26 |
1_1. <canvas> 기본도형 (0) | 2020.03.25 |