Closed Bug 994584 Opened 12 years ago Closed 4 years ago

Shadow clipped for fillRect

Categories

(Core :: Graphics: Canvas2D, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: krit, Unassigned)

Details

A fillRect with a shadow in the example here: http://webstuff.nfshost.com/shadowblur.html is drawn with destination-atop. This should draw the shadow on top of the fillRect() operation - which it does. Sadly the shadow is clipped to the bounds of the fillRect() operation as well but shouldn't.
Assignee: nobody → cabanier

The bug assignee didn't login in Bugzilla in the last 7 months.
:lsalzman, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: cabanier → nobody
Flags: needinfo?(lsalzman)

I believe the behavior of this test-case is correct. Destination-atop is effectively: dst * src.a + src * (1 - dst.a). Or stated in plain language from Mozilla dev docs: "The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content."

The test-case clears the canvas, then renders the shadow with destination-atop, then the rectangle with destination-atop. But since the final rectangle will essentially cut off everything outside of it due to the "not bound by mask" behavior of destination-atop, the shadow should actually be confined to the rectangle.

Flags: needinfo?(lsalzman)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.