crazypc
路人甲
路人甲
  • 注册日期2005-01-16
  • 发帖数2
  • QQ
  • 铜币120枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:920回复:1

怎么样实现画折线的时候,超出图范围时自动滚屏?

楼主#
更多 发布于:2005-07-14 15:50
   怎么样实现画折线的时候,超出图范围时自动滚屏?我用了下面的代码,滚屏的时候,虚线就没有了,前面画的看不到。<BR>procedure TForm1.Map1MouseMove(Sender: TObject; Shift: TShiftState; X,<BR>  Y: Integer);<BR>begin<BR>  //自动滚屏<BR>    if (x>Map1.MapScreenWidth-10) or (x >=Map1.MapScreenWidth) then<BR>    begin<BR>      Map1.CenterX := Map1.CenterX+0.05 ;<BR>    end;<BR>    if (x< 10)  or (x<=0)then<BR>    begin<BR>      Map1.CenterX := Map1.CenterX-0.05;<BR>    end;<BR>    if (y > Map1.MapScreenHeight -10) or (y >=Map1.MapScreenHeight)then<BR>    begin<BR>      Map1.CenterY :=Map1.CenterY-0.05;<BR>    end;<BR>    if (y< 10) or (x<=0)then<BR>    begin<BR>      Map1.CenterY := Map1.CenterY+0.05;<BR>    end;<BR>end;
喜欢0 评分0
crazypc
路人甲
路人甲
  • 注册日期2005-01-16
  • 发帖数2
  • QQ
  • 铜币120枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2005-07-15 18:27
自己顶
举报 回复(0) 喜欢(0)     评分
游客

返回顶部