要个delphi画图程序的代码!(能运行的)急须!!!!!
来源:百度知道 编辑:UC知道 时间:2024/06/25 21:55:00
回答问题啊!! 好的在加分 2点40后 就关闭问题!!
以下代码是用画布做的,是画椭圆、直线和矩形
希望我的回答对你有帮组!
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
st.X:=x;
st.Y:=y;
et:=st;
cp:=true;
with image1.canvas do
begin
pen.Mode:=pmnot;
pen.Color:=clblue;
brush.Style:=bsclear;
end;
end;
procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if cp then
case shapekind of
1:
begin
image1.Canvas.Ellipse(st.X,st.Y,et.x,et.y);
image1.