Allow CanvasPattern or CanvasGradient as stroke style

This commit is contained in:
Frederic Junod
2016-09-06 08:57:04 +02:00
parent 51776ed79e
commit e48fda6bef
12 changed files with 97 additions and 34 deletions

View File

@@ -1,7 +1,6 @@
goog.provide('ol.render.canvas.TextReplay');
goog.require('ol');
goog.require('ol.color');
goog.require('ol.colorlike');
goog.require('ol.render.canvas');
goog.require('ol.render.canvas.Instruction');
@@ -267,7 +266,7 @@ ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle) {
textStrokeStyleWidth : ol.render.canvas.defaultLineWidth;
var miterLimit = textStrokeStyleMiterLimit !== undefined ?
textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
var strokeStyle = ol.color.asString(textStrokeStyleColor ?
var strokeStyle = ol.colorlike.asColorLike(textStrokeStyleColor ?
textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle);
if (!this.textStrokeState_) {
this.textStrokeState_ = {