aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleShadowReference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleShadowReference.cpp')
-rwxr-xr-xsamplecode/SampleShadowReference.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/samplecode/SampleShadowReference.cpp b/samplecode/SampleShadowReference.cpp
index b3d462df62..6cd63798b5 100755
--- a/samplecode/SampleShadowReference.cpp
+++ b/samplecode/SampleShadowReference.cpp
@@ -94,9 +94,12 @@ protected:
if (fUseAlt) {
flags |= SkShadowFlags::kGeometricOnly_ShadowFlag;
}
+
+ SkColor ambientColor = SkColorSetARGB(ambientAlpha * 255, 0, 0, 0);
+ SkColor spotColor = SkColorSetARGB(spotAlpha * 255, 0, 0, 0);
SkShadowUtils::DrawShadow(canvas, path, zPlaneParams,
lightPos, lightWidth,
- ambientAlpha, spotAlpha, SK_ColorBLACK, flags);
+ ambientColor, spotColor, flags);
if (fShowObject) {
canvas->drawPath(path, paint);