From 856b409d0269bfa334ae5c098bd254e87f10d680 Mon Sep 17 00:00:00 2001
From: Anne van Kesteren
The current values of the following attributes: lineWidth
,
data-x="dom-context-2d-shadowOffsetX">shadowOffsetX
, shadowOffsetY
, shadowBlur
, shadowColor
, font
, textAlign
, textBaseline
, If the given value is a string, then:
Let context be this's canvas
attribute's value, if that is an element;
+ otherwise null.
Let parsedValue be the result of parsing the given value with this's canvas
attribute's value.
If parsedValue is failure, then return.
If the given value is a string, then:
Let context be this's canvas
attribute's value, if that is an element;
+ otherwise null.
Let parsedValue be the result of parsing the given value with this's canvas
attribute's value.
If parsedValue is failure, then return.
Objects which implement the CanvasShadowStyles
interface have an associated shadow color, which is a CSS color.
+ Initially, it must be transparent black.
The shadowColor
attribute sets the color of the
- shadow.
The shadowColor
setter steps are:
Let context be this's canvas
attribute's value, if that is an element; otherwise
+ null.
When the context is created, the shadowColor
- attribute initially must be transparent black.
Let parsedValue be the result of parsing the given value with context if non-null.
On getting, the serialization of the color - must be returned.
+If parsedValue is failure, then return.
On setting, the new value must be parsed
- with this canvas
element and the color assigned. If parsing the value results in
- failure then it must be ignored, and the attribute must retain its previous value.
- CSSCOLOR
Set this's shadow + color to parsedValue.
The Shadows are only drawn if the opacity component of
- the alpha component of the color of shadowOffsetX
and
shadowColor
is
- nonzero and either the shadowBlur
is nonzero, or
- the shadowOffsetX
is nonzero, or the shadowOffsetY
is nonzero.shadowBlur
+ is nonzero, or the shadowOffsetX
is nonzero, or
+ the shadowOffsetY
is nonzero.
When shadows are drawn, they must be rendered as follows:
@@ -69761,11 +69777,12 @@ console.log(pixels.data[2]);Set the red, green, and blue components of every pixel in B to the
- red, green, and blue components (respectively) of the color of shadowColor
.
Multiply the alpha component of every pixel in B by the alpha
- component of the color of shadowColor
.
The shadow is in the bitmap B, and is rendered as part of the drawing model described below.