500分求一简单画图源代码 功能只要达到windows自带画图板即可(不需要放大镜,区域选择等),大家帮帮忙!如果觉得分数不够,可以再加到10000分! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 gdi api里面不是有那么多的函数么?完全就可以实现你的功能了,看看msdn吧 to jq2002(j q) 你有代码吗?发我一份如何?[email protected] { 移动 }procedure TLine.Move(offsetX, offsetY: Integer);begin Canvas.Pen.Mode := pmNotXor; { 首次移动,保存原来的线段位置 } if not FMoving then begin FOldBeginPoint := FBeginPoint; FOldEndPoint := FEndPoint; end { 如果正在移动,则擦除原来的线段 } else begin Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y); Canvas.LineTo(FEndPoint.X, FEndPoint.Y); end; { 设置移动后的线段位置,并以虚线画出来 } SetBeginEndPoint(Point(FBeginPoint.X + offsetX, FBeginPoint.Y + offsetY), Point(FEndPoint.X + offsetX, FEndPoint.Y + offsetY)); Canvas.Pen.Style := psDot; Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y); Canvas.LineTo(FEndPoint.X, FEndPoint.Y); FMoving := True;end;{ 根据当前坐标位置改变线段大小 }procedure TLine.ReSize(ACurPoint: TPoint);begin Canvas.Pen.Mode := pmNotXor; { 首次改变线段的大小,保存原来线段的位置 } if (not FChangingBeginPoint) and (not FChangingEndPoint) then begin FOldBeginPoint := FBeginPoint; FOldEndPoint := FEndPoint; end { 擦除上次画的线段 } else begin Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y); Canvas.LineTo(FEndPoint.X, FEndPoint.Y); end; if not FChangingBeginPoint then FChangingBeginPoint := PtInRect(FSelectBlock1, ACurPoint); if not FChangingEndPoint then FChangingEndPoint := PtInRect(FSelectBlock2, ACurPoint); if FChangingBeginPoint then SetBeginPoint(ACurPoint); if FChangingEndPoint then SetEndPoint(ACurPoint); Canvas.Pen.Style := psDot; Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y); Canvas.LineTo(FEndPoint.X, FEndPoint.Y);end;{ 设置线段的起始位置和终止位置 }procedure TLine.SetBeginEndPoint(ABeginPoint, AEndPoint: TPoint);begin SetBeginPoint(ABeginPoint); SetEndPoint(AEndPoint);end;{-------------------- Private --------------------}{ 设置线段的开始位置 }procedure TLine.SetBeginPoint(Value: TPoint);begin if (Value.X <> FBeginPoint.X) or (Value.Y <> FBeginPoint.Y) then begin FBeginPoint := Value; FSelectBlock1 := Rect(FBeginPoint.X - 3, FBeginPoint.Y - 3, FBeginPoint.X + 4, FBeginPoint.Y + 4); end;end;{ 设置线段的结束位置 }procedure TLine.SetEndPoint(Value: TPoint);begin if (Value.X <> FEndPoint.X) or (Value.Y <> FEndPoint.Y) then begin FEndPoint := Value; FSelectBlock2 := Rect(FEndPoint.X - 3, FEndPoint.Y - 3, FEndPoint.X + 4, FEndPoint.Y + 4); end;end; 1.在"...\Borland\Delphi6\Demos\Doc\Graphex"目录下就有一个小例子。2.我还有一个,留下你的Email。 ado与dbgrideh的问题 在sql数据库中,备份选定的表 怎样制作动态报表? 用SMTP做收发电子邮件程序,提示需要SMTP验证? 动态过程!!!多谢! 问个简单问题,顺便祝大家工作顺利,万事如意!!! 怪!怪!怪!为什么我用Qreport做的报表在打印时总打印上次打印的内容? 谁有全系列Delphi 帮我作毕业设计 c/s模式 delphi 有偿 请问如何设置动态二维数组? 自己编的*.Dll静态和动态调用为什么出现以下问题? 怎样制做试用版程序
你有代码吗?发我一份如何?
[email protected]
procedure TLine.Move(offsetX, offsetY: Integer);
begin
Canvas.Pen.Mode := pmNotXor;
{ 首次移动,保存原来的线段位置 }
if not FMoving then
begin
FOldBeginPoint := FBeginPoint;
FOldEndPoint := FEndPoint;
end
{ 如果正在移动,则擦除原来的线段 }
else begin
Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y);
Canvas.LineTo(FEndPoint.X, FEndPoint.Y);
end; { 设置移动后的线段位置,并以虚线画出来 }
SetBeginEndPoint(Point(FBeginPoint.X + offsetX, FBeginPoint.Y + offsetY),
Point(FEndPoint.X + offsetX, FEndPoint.Y + offsetY));
Canvas.Pen.Style := psDot;
Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y);
Canvas.LineTo(FEndPoint.X, FEndPoint.Y); FMoving := True;
end;{ 根据当前坐标位置改变线段大小 }
procedure TLine.ReSize(ACurPoint: TPoint);
begin
Canvas.Pen.Mode := pmNotXor; { 首次改变线段的大小,保存原来线段的位置 }
if (not FChangingBeginPoint) and (not FChangingEndPoint) then
begin
FOldBeginPoint := FBeginPoint;
FOldEndPoint := FEndPoint;
end
{ 擦除上次画的线段 }
else begin
Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y);
Canvas.LineTo(FEndPoint.X, FEndPoint.Y);
end; if not FChangingBeginPoint then
FChangingBeginPoint := PtInRect(FSelectBlock1, ACurPoint); if not FChangingEndPoint then
FChangingEndPoint := PtInRect(FSelectBlock2, ACurPoint); if FChangingBeginPoint then SetBeginPoint(ACurPoint);
if FChangingEndPoint then SetEndPoint(ACurPoint);
Canvas.Pen.Style := psDot;
Canvas.MoveTo(FBeginPoint.X, FBeginPoint.Y);
Canvas.LineTo(FEndPoint.X, FEndPoint.Y);
end;{ 设置线段的起始位置和终止位置 }
procedure TLine.SetBeginEndPoint(ABeginPoint, AEndPoint: TPoint);
begin
SetBeginPoint(ABeginPoint);
SetEndPoint(AEndPoint);
end;{-------------------- Private --------------------}{ 设置线段的开始位置 }
procedure TLine.SetBeginPoint(Value: TPoint);
begin
if (Value.X <> FBeginPoint.X) or (Value.Y <> FBeginPoint.Y) then
begin
FBeginPoint := Value;
FSelectBlock1 := Rect(FBeginPoint.X - 3, FBeginPoint.Y - 3,
FBeginPoint.X + 4, FBeginPoint.Y + 4);
end;
end;{ 设置线段的结束位置 }
procedure TLine.SetEndPoint(Value: TPoint);
begin
if (Value.X <> FEndPoint.X) or (Value.Y <> FEndPoint.Y) then
begin
FEndPoint := Value;
FSelectBlock2 := Rect(FEndPoint.X - 3, FEndPoint.Y - 3,
FEndPoint.X + 4, FEndPoint.Y + 4);
end;
end;
2.我还有一个,留下你的Email。