Support fillOpacity and strokeOpacity on shape symbolizers

This commit is contained in:
Tim Schaub
2013-07-30 15:38:13 -06:00
parent 2a1ece194d
commit 1cedea6606
4 changed files with 316 additions and 123 deletions

View File

@@ -400,8 +400,6 @@ ol.renderer.canvas.VectorRenderer.renderCircle_ = function(circle) {
canvas.height = size;
canvas.width = size;
context.globalAlpha = circle.opacity;
if (fillColor) {
context.fillStyle = fillColor;
}
@@ -416,9 +414,13 @@ ol.renderer.canvas.VectorRenderer.renderCircle_ = function(circle) {
context.arc(mid, mid, circle.size / 2, 0, twoPi, true);
if (fillColor) {
goog.asserts.assertNumber(circle.fillOpacity);
context.globalAlpha = circle.fillOpacity;
context.fill();
}
if (strokeColor) {
goog.asserts.assertNumber(circle.strokeOpacity);
context.globalAlpha = circle.strokeOpacity;
context.stroke();
}
return canvas;