From b96455b06bdad1d28bae395c5a9f524a7dbac106 Mon Sep 17 00:00:00 2001 From: kate Date: Thu, 23 Aug 2018 20:15:40 +0800 Subject: [PATCH] rotate --- index.html | 4 ++-- src/alimask.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 627a04f..fa6c55b 100644 --- a/index.html +++ b/index.html @@ -62,9 +62,9 @@

Usage

The code of alimask hosted on Github, click here. Welcome to issue or pull request.

- + \ No newline at end of file diff --git a/src/alimask.js b/src/alimask.js index 61b6586..8dc3806 100644 --- a/src/alimask.js +++ b/src/alimask.js @@ -80,7 +80,7 @@ ctx.textBaseline = 'bottom'; ctx.translate(width * 0.1, height * 0.9); // margin: 10 - ctx.rotate(-Math.PI / 12); // 15 degree + ctx.rotate(options.rotate * -Math.PI / 180); // 15 degree ctx.fillText(text, 0, 0); return canvas.toDataURL();