Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(628)

Unified Diff: sky/examples/raw/painting.sky

Issue 1155193004: Canvas.concat takes a 16-element Float32List instead of an array. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: more fixes Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/tonic/float32_list.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/raw/painting.sky
diff --git a/sky/examples/raw/painting.sky b/sky/examples/raw/painting.sky
index 70c519febe8098a194c79bd2a7c6ebe2373238dd..075867a8c6e0cd0ede15c1360c0dca42de0f1405 100644
--- a/sky/examples/raw/painting.sky
+++ b/sky/examples/raw/painting.sky
@@ -8,6 +8,7 @@ div {
<div id="canvas" />
<script>
import 'dart:math' as math;
+import 'dart:typed_data';
import 'dart:sky';
void main() {
@@ -29,11 +30,12 @@ void main() {
paint);
// Scale x and y by 0.5.
- var scaleMatrix = [
- 0.5, 0.0, 0.0,
- 0.0, 0.5, 0.0,
- 0.0, 0.0, 1.0
- ];
+ var scaleMatrix = new Float32List.fromList([
+ 0.5, 0.0, 0.0, 0.0,
+ 0.0, 0.5, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0, 1.0,
+ ]);
context.concat(scaleMatrix);
paint.color = const Color.fromARGB(128, 0, 255, 0);
context.drawCircle(0.0, 0.0, radius, paint);
« no previous file with comments | « sky/engine/tonic/float32_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698