アットウィキロゴ

camp

import 'dart:html';
 
 
void main() {
 
CanvasElement canv = new Element.tag("canvas");
canv.height = 700;
canv.width = 700;
document.body.children.add(canv);
var ctx = canv.getContext("2d");
ctx.font ="30px 'MS ゴシック'";
ctx.fillText("猫", 50, 50);
 
ctx.beginPath();
ctx.moveTo(100, 100);
ctx.lineTo(100,600);
ctx.lineTo(600, 600);
ctx.stroke();
 
List<int>x=new List<int>(101);
List<int>y=new List<int>(101);
 
int s;
 
for(s=1;s<101;s++){
x[s]=5*s+100;
y[s]=5*s+100;
}
 
 
ctx.beginPath();
ctx.moveTo(x[1], y[1]);
for(s=2;s<101;s++){
ctx.lineTo(x[s],y[s]);
}
ctx.stroke();
 
 
}
 
最終更新:2013年11月22日 00:30