Commit 15687c88 authored by Matt Perry's avatar Matt Perry

Sky: Add a DrawLooper interface to the painting API to be used for shadows.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1144193006
parent 270e3863
...@@ -40,6 +40,20 @@ void main() { ...@@ -40,6 +40,20 @@ void main() {
context.restore(); context.restore();
var builder = new LayerDrawLooperBuilder()
..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(150.0, 0.0)..setPaintBits(-1),
(Paint layerPaint) {
// TODO(mpcomplete): This won't do anything until we add support for
// setting the color filter.
layerPaint.setARGB(128, 0, 0, 255);
})
..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(75.0, 75.0)..setPaintBits(0),
(Paint layerPaint) {
layerPaint.setARGB(128, 255, 0, 0);
});
paint.setDrawLooper(builder.build());
context.drawCircle(0.0, 0.0, radius, paint); context.drawCircle(0.0, 0.0, radius, paint);
context.commit(); context.commit();
......
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