Canvas does not render shadows.

RESOLVED DUPLICATE of bug 310682

Status

()

Core
Canvas: 2D
RESOLVED DUPLICATE of bug 310682
13 years ago
13 years ago

People

(Reporter: Jayant Sai, Unassigned)

Tracking

1.8 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
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

Comment 1

13 years ago
dup of bug 310682 ?

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