//鼠标左键释放表明绘图工作结束-Delphi程序设计教程—图形图像程序设计
//鼠标左键释放,表明绘图工作结束procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if fHasPic then //如果有动态临时图形begin //擦除老图形case RadioGroup3.ItemIndex of 0:canvas.Rectangle(fx,fy,fbx,fby);//矩形1:canvas.Ellipse(fx,fy,fbx,fby);//椭圆2:canvas.Ellipse(fx,fy,fbx,fy+fbx-fx);//画圆3:canvas.RoundRect(fx,fy,fbx,fby,15);//圆矩形end; Canvas.Pen.Mode:=pmCopy;//设置最终画笔模式//绘制最终的图形case RadioGroup3.ItemIndex of 0:canvas.Rectangle(fx,fy,x,y);//矩形1:canvas.Ellipse(fx,fy,x,y);//椭圆2:canvas.Ellipse(fx,fy,x,fy+x-fx);//画圆3:canvas.RoundRect(fx,fy,x,y,15);//圆矩形end; fMouseDown:=False; //表示鼠标已经弹起,本次鼠标操作结束end;
2.31MB
文件大小:
评论区