Unverified Commit d518bd2d authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Pass shadowColor param to SceneBuilder (#15714)

* pass shadowColor param to SceneBuilder

* add doc comment and diagnostic node for shadowColor

* Add missing shadowColor param
parent ad9506d2
...@@ -764,9 +764,11 @@ class PhysicalModelLayer extends ContainerLayer { ...@@ -764,9 +764,11 @@ class PhysicalModelLayer extends ContainerLayer {
@required this.clipPath, @required this.clipPath,
@required this.elevation, @required this.elevation,
@required this.color, @required this.color,
@required this.shadowColor,
}) : assert(clipPath != null), }) : assert(clipPath != null),
assert(elevation != null), assert(elevation != null),
assert(color != null); assert(color != null),
assert(shadowColor != null);
/// The path to clip in the parent's coordinate system. /// The path to clip in the parent's coordinate system.
/// ///
...@@ -786,6 +788,9 @@ class PhysicalModelLayer extends ContainerLayer { ...@@ -786,6 +788,9 @@ class PhysicalModelLayer extends ContainerLayer {
/// (as described at [Layer]). /// (as described at [Layer]).
Color color; Color color;
/// The shadow color.
Color shadowColor;
@override @override
void addToScene(ui.SceneBuilder builder, Offset layerOffset) { void addToScene(ui.SceneBuilder builder, Offset layerOffset) {
if (!debugDisablePhysicalShapeLayers) if (!debugDisablePhysicalShapeLayers)
...@@ -793,6 +798,7 @@ class PhysicalModelLayer extends ContainerLayer { ...@@ -793,6 +798,7 @@ class PhysicalModelLayer extends ContainerLayer {
path: clipPath.shift(layerOffset), path: clipPath.shift(layerOffset),
elevation: elevation, elevation: elevation,
color: color, color: color,
shadowColor: shadowColor,
); );
addChildrenToScene(builder, layerOffset); addChildrenToScene(builder, layerOffset);
if (!debugDisablePhysicalShapeLayers) if (!debugDisablePhysicalShapeLayers)
......
...@@ -1495,6 +1495,7 @@ abstract class _RenderPhysicalModelBase<T> extends _RenderCustomClip<T> { ...@@ -1495,6 +1495,7 @@ abstract class _RenderPhysicalModelBase<T> extends _RenderCustomClip<T> {
super.debugFillProperties(description); super.debugFillProperties(description);
description.add(new DoubleProperty('elevation', elevation)); description.add(new DoubleProperty('elevation', elevation));
description.add(new DiagnosticsProperty<Color>('color', color)); description.add(new DiagnosticsProperty<Color>('color', color));
description.add(new DiagnosticsProperty<Color>('shadowColor', color));
} }
} }
...@@ -1596,6 +1597,7 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> { ...@@ -1596,6 +1597,7 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
clipPath: offsetClipPath, clipPath: offsetClipPath,
elevation: elevation, elevation: elevation,
color: color, color: color,
shadowColor: shadowColor,
); );
context.pushLayer(physicalModel, super.paint, offset, childPaintBounds: offsetBounds); context.pushLayer(physicalModel, super.paint, offset, childPaintBounds: offsetBounds);
} else { } else {
...@@ -1702,6 +1704,7 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> { ...@@ -1702,6 +1704,7 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase<Path> {
clipPath: offsetPath, clipPath: offsetPath,
elevation: elevation, elevation: elevation,
color: color, color: color,
shadowColor: shadowColor,
); );
context.pushLayer(physicalModel, super.paint, offset, childPaintBounds: offsetBounds); context.pushLayer(physicalModel, super.paint, offset, childPaintBounds: offsetBounds);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment