Closed Bug 311747 Opened 19 years ago Closed 19 years ago

Canvas does not render shadows.

Categories

(Core :: Graphics: Canvas2D, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 310682

People

(Reporter: jsai, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4

javascript :

function drawDragBox() {
  var canvas = document.getElementById("canvas");
  var context = canvas.getContext("2d");
  context.strokeStyle = "rgb(0, 0, 0)";
  context.fillStyle = "rgba(255, 255, 255, 0.5)";
  context.shadowBlur = 5;
  context.shadowColor = "rgba(255, 0, 0, 0.75)";
  context.shadowOffsetX = 10;
  context.shadowOffsetY = 10;

  context.beginPath();
  context.lineWidth = 1;
  context.rect(100, 100, 100, 100);
  context.stroke();

  context.restore();
}

html :
<canvas id="canvas" width="300" height="300"></canvas>

Reproducible: Always

Steps to Reproduce:
1. Source shown below does not render shadow as expected.
Actual Results:  
Draws a rectangle as expected.

Expected Results:  
The rectangle should have a shadow as seen on screenshot.
Component: General → Layout: Canvas
Product: Firefox → Core
QA Contact: general → layout.canvas
Version: unspecified → 1.8 Branch

*** This bug has been marked as a duplicate of 310682 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.