for(int i = 0, i < 20, i++) { for(int j = 0, j < 20, j++) { Image1->Canvas->MoveTo(i,j); Image1->Canvas->LineTo(i,j); } }