more fixes for gradient

This commit is contained in:
Anton Lavrenov
2019-02-20 11:33:00 -05:00
parent 3f410b7d3b
commit 645ac49882
4 changed files with 17 additions and 10 deletions

View File

@@ -140,6 +140,7 @@ export class Text extends Shape {
n;
var translateY = 0;
var translateY = lineHeightPx / 2;
var lineTranslateX = 0;
var lineTranslateY = 0;
@@ -157,7 +158,7 @@ export class Text extends Shape {
alignY = this.getHeight() - textArrLen * lineHeightPx - padding * 2;
}
context.translate(padding, alignY + padding + lineHeightPx / 2);
context.translate(padding, alignY + padding);
// draw text lines
for (n = 0; n < textArrLen; n++) {