Commit 6ed8fb86 authored by Matt Perry's avatar Matt Perry

Sky: Small fixes to Gradient interface. Added comments and renamed constructors.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1180873003.
parent b656316b
...@@ -26,10 +26,9 @@ void main() { ...@@ -26,10 +26,9 @@ void main() {
paint.color = const Color.fromARGB(128, 255, 0, 255); paint.color = const Color.fromARGB(128, 255, 0, 255);
context.rotate(math.PI/4.0); context.rotate(math.PI/4.0);
Gradient yellowBlue = new Gradient.Linear( Gradient yellowBlue = new Gradient.linear(
[new Point(-radius, -radius), new Point(0.0, 0.0)], [new Point(-radius, -radius), new Point(0.0, 0.0)],
[const Color(0xFFFFFF00), const Color(0xFF0000FF)], [const Color(0xFFFFFF00), const Color(0xFF0000FF)]);
null);
context.drawRect(new Rect.fromLTRB(-radius, -radius, radius, radius), context.drawRect(new Rect.fromLTRB(-radius, -radius, radius, radius),
new Paint()..setShader(yellowBlue)); new Paint()..setShader(yellowBlue));
...@@ -67,7 +66,7 @@ void main() { ...@@ -67,7 +66,7 @@ void main() {
..setColorMode(TransferMode.srcMode) ..setColorMode(TransferMode.srcMode)
..setPaintBits(-1), ..setPaintBits(-1),
(Paint layerPaint) { (Paint layerPaint) {
Gradient redYellow = new Gradient.Radial( Gradient redYellow = new Gradient.radial(
new Point(0.0, 0.0), radius/3.0, new Point(0.0, 0.0), radius/3.0,
[const Color(0xFFFFFF00), const Color(0xFFFF0000)], [const Color(0xFFFFFF00), const Color(0xFFFF0000)],
null, TileMode.mirror); null, TileMode.mirror);
......
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