【例子介绍】
研究数学、曲线、绳套,等有很大帮助
【相关图片】
【源码结构】
procedure Tform1.quadrillage; // bmpfond grid pattern
var
i : integer;
begin
Bmpfond := tbitmap.create;
Bmpfond.width := image1.width;
Bmpfond.height := image1.height;
with Bmpfond.canvas do
begin
brush.color := clwhite;
fillrect(rect(0,0,Image1.width, Image1.height));
cx := Image1.width div 2;
cy := Image1.height div 2;
for i := 1 to Image1.width div 10 do
begin
if i mod 5 = 0 then pen.color := $00B0E0FF else pen.color := $00F0F4FF;
moveto(cx i*5, 0); lineto(cx i*5, Image1.height);
moveto(cx-i*5, 0); lineto(cx-i*5, Image1.height);
end;
for i := 1 to Image1.height div 10 do
begin
if i mod 5 = 0 then pen.color := $00B0E0FF else pen.color := $00F0F4FF;
moveto(0,cy i*5); lineto(Image1.width,cy i*5);
moveto(0,cy-i*5); lineto(Image1.width,cy-i*5);
end;
pen.color:= $0080B0D0;
moveto(0,cy); lineto(Image1.width,cy);
moveto(cx,0); lineto(cx, Image1.height);
end;
end;
评论