|
阅读:920回复:1
怎么样实现画折线的时候,超出图范围时自动滚屏?
怎么样实现画折线的时候,超出图范围时自动滚屏?我用了下面的代码,滚屏的时候,虚线就没有了,前面画的看不到。<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;
|
|
|
1楼#
发布于:2005-07-15 18:27
自己顶
|
|