New issue
Advanced search Search tips

Issue 603727 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 602933
Owner: ----
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

drawImage in a rotated context doesn't draw shadow

Reported by ranz...@gmail.com, Apr 14 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36

Example URL:
http://flashcanvas.net/examples/dl.dropbox.com/u/1865210/mindcat/canvas_shadow.html

Steps to reproduce the problem:
1. Create a canvas and canvasContext(2d)
2. Specify context.shadowOffsetX and context.shadowOffsetY.
3. Rotate the canvas context arbitrarily with ctx.rotate(x).
4. Use context.drawImage with a dataURL or other image, with or without transparency.

What is the expected behavior?
Drop shadow is drawn according to canvas-relative shadow offsets and in the shape of the image or non-transparent portions.

What went wrong?
No shadow when context has been rotated. Shadow IS drawn when context rotation is zero.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes At least six months ago. Only noticed today.

Does this work in other browsers? Yes 

Chrome version: 49.0.2623.112  Channel: n/a
OS Version: Xubuntu
Flash Version: Shockwave Flash 21.0 r0

URL given is a handy test page, but the image text has an obnoxious fading action that fades out completely at zero rotation. Another test is my own project: http://caliber.online, where each tank should have a separate shadow for body and turret. A body or turret facing directly east (zero rotation) will have a shadow appear, but any rotation and the shadow is not drawn.
 

Comment 1 by ranz...@gmail.com, Apr 14 2016

Same in Win7, Chrome 49.0.2623.112 m (64-bit)

Side-by-side with Firefox 41.0.2:
http://i.imgur.com/Mrd5s9U.png
http://i.imgur.com/FuPpi9g.png

Comment 2 by keishi@chromium.org, Apr 15 2016

Components: -Blink Blink>Canvas
Labels: Needs-Bisect
Status: Available (was: Unconfirmed)
Does reproduce in mac 52.0.2708.0
Doesn't reproduce in mac 49.0.2623.110
Needs bisect

minimal example:
https://jsfiddle.net/ha8usk15/
both logos should have shadow
expected.png
19.5 KB View Download
m52.png
19.9 KB View Download

Comment 3 by ranz...@gmail.com, Apr 15 2016

Just out of curiosity:
Android 6.0.1, Nexus 6
Chrome 49.0.2623.105

No shadows.
Screenshot_20160414-185023.png
434 KB View Download

Comment 4 by ranz...@gmail.com, Apr 15 2016

Clarification: Same bug on Android, just hard to capture the East-facing zero rotation with no touch methods to play yet.
ranzear: is this duplicate of:
https://bugs.chromium.org/p/chromium/issues/detail?id=602933

Comment 6 by ranz...@gmail.com, Apr 15 2016

Duplicate indeed. I searched specifically for drawImage, which that post doesn't mention by name nor mention the issue is only with drawImage.
Mergedinto: 602933
Status: Duplicate (was: Available)
ranzear@ : Thanks for Conforming, hence merged into  Issue 602933 .

xidachen@ : Please undo if it needs to be tracked separately. 

Sign in to add a comment