Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.81 KB | None | 0 0
  1. import 'dart:html';
  2. import 'dart:async';
  3. import 'dart:math';
  4.  
  5. CanvasElement myCanvas;
  6. CanvasRenderingContext2D context;
  7. var randomGenerator = new Random();
  8.  
  9.  
  10. DivElement output = querySelector('#output');
  11. Duration longDuration = new Duration(seconds:3);
  12. Duration shortDuration = new Duration(milliseconds: 500);
  13. Future longPause() => new Future.delayed(longDuration);
  14. Future shortPause() => new Future.delayed(shortDuration);
  15.  
  16. main() {
  17. myCanvas = querySelector("#mycanvas");
  18. context = myCanvas.context2D;
  19. for (int i = 1; i < 2; i++) {
  20. context.beginPath();
  21. context.lineWidth = 10;
  22. context.strokeStyle = blue();
  23. var start = new Point(200, 300);
  24. var end = new Point(200, 400);
  25. context.moveTo(start.x, start.y);
  26. context.lineTo(end.x, end.y);
  27. context.stroke();
  28. // ignore: missing_identifier
  29. var = ();
  30.  
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement