Commits

Chris Leonello committed bcf0b29

Allow filled rectangular shadows.

Comments (0)

Files changed (1)

src/jqplot.shadowRenderer.js

         ctx.save();
         var opts = (options != null) ? options : {};
         var fill = (opts.fill != null) ? opts.fill : this.fill;
+        var fillRect = (opts.fillRect != null) ? opts.fillRect : this.fillRect;
         var closePath = (opts.closePath != null) ? opts.closePath : this.closePath;
         var offset = (opts.offset != null) ? opts.offset : this.offset;
         var alpha = (opts.alpha != null) ? opts.alpha : this.alpha;
             if (isarc) {
                 ctx.arc(points[0], points[1], points[2], points[3], points[4], true);                
             }
+            else if (fillRect) {
+                if (fillRect) {
+                    ctx.fillRect(points[0], points[1], points[2], points[3]);
+                }
+            }
             else if (points && points.length){
                 var move = true;
                 for (var i=0; i<points.length; i++) {