From 8dda2cb6453a9f081a8a3c0ea8fbf4b76ad4ec71 Mon Sep 17 00:00:00 2001 From: Vadim Namniak Date: Sun, 12 Oct 2014 10:37:29 -0400 Subject: [PATCH] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9a5a8f0..afa6fbc 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ 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 (REQUIRED), weight & family, similar to CSS font shorthand property +- ```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 - ```paddingX: Number``` - horizontal padding in pixels set equally on both, left and right sides of the element @@ -39,7 +39,7 @@ The default options object which values will be used if a property is not specif ``` ##Usage -Use standard canvas text drawing methods such as "fillStyle" and "globalCompositeOperation" when needed before using CanvasTextWrapper like so: +Use standard canvas text drawing сщташпгкфешщты such as "fillStyle" and "globalCompositeOperation" when needed before using CanvasTextWrapper like so: ``` var canvas = document.createElement('canvas'); canvas.width = 300; @@ -48,8 +48,6 @@ context = canvas.getContext("2d"); context.fillStyle = "rgb(255, 255, 255)"; context.fillRect(0, 0, canvas.width, canvas.height); -context.globalCompositeOperation = "destination-out"; - new CanvasTextWrapper(canvas, "Hi there", { font: "normal 40px Open Sans, sans-serif", textAlign: "center",