Hi, i'm experiencing an error with this code:

form1.canvas.brush.color:=clblack;
bitmap1:=tbitmap.create;
bitmap1.loadfromfile('foo.bmp'); // a 16x16 bitmap
bitmap1.canvas.moveto[0,0;
bitmap1.canvas.lineto[5,5];
bitmap1.savetofile('foo2.bmp');

gives acces violation(runtime) in Lazarus..if I omit the moveto and lineto it works. anyone has a clue?
Thanks.