| OLD | NEW |
| 1 <sky> | 1 <sky> |
| 2 <style> | 2 <style> |
| 3 div { | 3 div { |
| 4 height: 200px; | 4 height: 200px; |
| 5 background-color: lightblue; | 5 background-color: lightblue; |
| 6 } | 6 } |
| 7 </style> | 7 </style> |
| 8 <div id="canvas" /> | 8 <div id="canvas" /> |
| 9 <script> | 9 <script> |
| 10 import 'dart:math' as math; | 10 import 'dart:math' as math; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 0.5, 0.0, 0.0, | 33 0.5, 0.0, 0.0, |
| 34 0.0, 0.5, 0.0, | 34 0.0, 0.5, 0.0, |
| 35 0.0, 0.0, 1.0 | 35 0.0, 0.0, 1.0 |
| 36 ]; | 36 ]; |
| 37 context.concat(scaleMatrix); | 37 context.concat(scaleMatrix); |
| 38 paint.setARGB(128, 0, 255, 0); | 38 paint.setARGB(128, 0, 255, 0); |
| 39 context.drawCircle(0.0, 0.0, radius, paint); | 39 context.drawCircle(0.0, 0.0, radius, paint); |
| 40 | 40 |
| 41 context.restore(); | 41 context.restore(); |
| 42 | 42 |
| 43 var builder = new LayerDrawLooperBuilder() |
| 44 ..addLayerOnTop( |
| 45 new DrawLooperLayerInfo()..setOffset(150.0, 0.0)..setPaintBits(-1), |
| 46 (Paint layerPaint) { |
| 47 // TODO(mpcomplete): This won't do anything until we add support for |
| 48 // setting the color filter. |
| 49 layerPaint.setARGB(128, 0, 0, 255); |
| 50 }) |
| 51 ..addLayerOnTop( |
| 52 new DrawLooperLayerInfo()..setOffset(75.0, 75.0)..setPaintBits(0), |
| 53 (Paint layerPaint) { |
| 54 layerPaint.setARGB(128, 255, 0, 0); |
| 55 }); |
| 56 paint.setDrawLooper(builder.build()); |
| 43 context.drawCircle(0.0, 0.0, radius, paint); | 57 context.drawCircle(0.0, 0.0, radius, paint); |
| 44 | 58 |
| 45 context.commit(); | 59 context.commit(); |
| 46 }); | 60 }); |
| 47 } | 61 } |
| 48 </script> | 62 </script> |
| 49 </sky> | 63 </sky> |
| OLD | NEW |