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.style.RegularShape');
goog.require('ol');
goog.require('ol.color');
goog.require('ol.colorlike');
goog.require('ol.dom');
goog.require('ol.has');
@@ -329,7 +328,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
var strokeWidth = 0;
if (this.stroke_) {
strokeStyle = ol.color.asString(this.stroke_.getColor());
strokeStyle = ol.colorlike.asColorLike(this.stroke_.getColor());
strokeWidth = this.stroke_.getWidth();
if (strokeWidth === undefined) {
strokeWidth = ol.render.canvas.defaultLineWidth;