HTML and CSS Reference
In-Depth Information
var
tempColor
=
context
.
createPattern
(
pattern
,
"repeat"
);
}
else
var
else
{
tempColor
=
textFillColor
;
}
Now, when we set our
fillStyle
or
strokeStyle
, we use
tempColor
instead of
tex-
tFillColor
. This will set the proper text fill choice that will be displayed on the canvas, as
shown in
Figure 3-10
:
context
.
fillStyle
=
tempColor
;