Update README.md

This commit is contained in:
Vadim Namniak
2014-10-12 10:49:45 -04:00
parent 8dda2cb645
commit bb707cd508
+3 -3
View File
@@ -9,12 +9,12 @@ new CanvasTextWrapper(HTMLCanvasElement, String [, options]);
```options``` - is a JavaScript object with the following available properties and values:
- ```font: String``` - text style that includes font size (in px), weight and family, similarly to CSS font shorthand property
- ```textAlign: "left" | "center" | "right"``` - horizontal alignment that applies for each line
- ```verticalAlign: "top" | "middle" | "bottom"``` - vertical alignment that applies on a whole block of text
- ```textAlign: "left" | "center" | "right"``` - horizontal alignment for each line
- ```verticalAlign: "top" | "middle" | "bottom"``` - vertical alignment for the whole text block
- ```paddingX: Number``` - horizontal padding in pixels set equally on both, left and right sides of the element
- ```paddingY: Number``` - vertical padding in pixels set equally on both, top and bottom sides of the element
- ```fitParent: Boolean``` - parameter that controls which element to fit where ```true``` means fit canvas parent's width instead of canvas own width
- ```lineBreak: "auto" | "word"``` - text split rule. When using ```"auto"```, text fills the element's width going to a new line on a whole word when no more space. If ```"word"``` is set as value, each next word will be placed on a new line.
- ```lineBreak: "auto" | "word"``` - text split rule. When using ```"auto"```, text fills the element's width, going to a new line on a whole word when there's no more room. If ```"word"``` is set as value, each next word will be placed on a new line.
- ```sizeToFill: Boolean``` - ignore given font size and resize text to fill its padded container
- ```strokeText: Boolean``` - add text outline based on context configuration (make sure it doesn't contradict with other context settings such as globalCompositeOperation, etc)