{"size": 455, "ext": "js", "max_stars_repo_path": "snippets/canvas/canvas.js", "max_stars_repo_name": "pimaxdev/tabris", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "snippets/canvas/canvas.js", "max_issues_repo_name": "pimaxdev/tabris", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "snippets/canvas/canvas.js", "max_forks_repo_name": "pimaxdev/tabris", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.2777777778, "max_line_length": 65, "alphanum_fraction": 0.6417582418}
var page = tabris.create("Page", {
  title: "Canvas",
  topLevel: true
});

tabris.create("Canvas", {
  layoutData: {left: 10, top: 10, right: 10, bottom: 10}
}).on("resize", function(canvas, bounds) {
  var ctx = canvas.getContext("2d", bounds.width, bounds.height);
  ctx.strokeStyle = "rgb(78, 154, 217)";
  ctx.lineWidth = 10;
  ctx.moveTo(20, 20);
  ctx.lineTo(bounds.width - 40, bounds.height - 40);
  ctx.stroke();
}).appendTo(page);

page.open();
