IDisplayTransformation

本文详细介绍了IDisplayTransformation中Bounds、FittedBounds等属性的作用,包括它们如何在数据视图和布局视图中被使用,以及这些属性如何响应页面大小变化、分辨率调整等情况。此外,还介绍了IScreenDisplay中与平移相关的PanStart、PanMoveTo和PanStop方法的典型使用流程。

IDisplayTransformation

BoundsFull extent in world coordinates.

The Bounds property controls the full extent of the display.  IActiveView::FullExtent really stores its full extent here and it has two uses for this property.  In data view, IActiveView calculates the full extent of all the layers and automatically recalculates it whenever the spatial reference changes and when layers are added or removed from the Map.  In layout view, IActiveView stores in FullExtent, the page size (expanded some) and it recalculates this property whenever the page size changes.

Setting the Bounds also sets the VisibleBounds to the same envelope and fires the ITransformEvents::BoundsUpdated and ITransformEvents::VisibleBoundsUpdated events.

DeviceFrameVisible extent in device coordinates.
FittedBoundsDevice frame in world coordinates.

 

ResolutionResolution of the device in dots (pixels) per inch.
ScaleRatioScale between FittedBounds and DeviceFrame.

 

VisibleBoundsVisible extent in world coordinates.

In layout view, when the Page is zoomed 1:1, the resolution equals the device resolution.  When the Page is zoomed to > 100%, the resolution is set higher so that graphics are magnified.

In data view, the Map object always has its resolution set to that of the display.  Graphics are not magnified in this view when you zoom in.

The units are always in pixels per inch.

After setting the resolution, the ITransformEvents::ResolutionUpdated event is fired.

 

IScreenDisplay

PanMoveTo pans the display by calculating an offset distance between the start point supplied to PanStart and the destination point provided to this method.  The recording cache is automatically redrawn each time PanMoveTo is called. Use the envelope PanStop returns to truly refresh the display.

The typical sequence for using the pan methods is as follows:

  • OnMouseDown - PanStart
  • OnMouseMove - PanMoveTo
  • OnMouseUp - PanStop

 

转载于:https://www.cnblogs.com/yhlx125/p/3714966.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值