阅读:1716回复:1
旋转,急!
请问各位:在AO的独立开发中,旋转是如何实现的?谢了!
|
|
1楼#
发布于:2003-12-11 22:06
在ao开发帮助里有个Rotate Display的例子,你可以看看
Description: This sample primarily demonstrates setting the MapControl's Rotation property, and secondly demonstrates setting the MapControl MouseIcon and MousePointer properties. The MouseIcon property is set to a custom icon stored in a resource file using the IPictureDisp LoadResFile method in the FormLoad event. This MouseIcon will be used whenever the MousePointer property is set to esriPointerCustom. The Microsoft Common Dialog Control (Comdlg32.ocx) allows users to search and select map documents, which are validated and loaded into the MapControl using the CheckMxFile and LoadMxFile methods. The OnBeforeScreenDraw and OnAfterScreenDraw events are used to set the MousePointer while the display is refreshing due to Extent changes. The OnMouseDown event uses either the TrackRectangle method to zoom in or the IScreenDisplay RotateStart method to start rotating around the centre of the display based upon the current mouse location. The OnMouseMove event uses the IScreenDisplay RotateMoveTo and RotateTimer methods to move and re-draw the display to the screen. The OnMouseUp event uses the IScreenDisplay RotateStop method to determine the angle of rotation. The MapControl's Rotation property is set to this angle, and the display is refreshed is reflect the change. |
|
2楼#
发布于:2003-12-12 08:58
首先感谢GIS先生的回答,但我说的旋转是旋转选中的ELEMENT或FEATURE,而不是旋转DISPLAY,有没有相关的列子呢?
|
|
3楼#
发布于:2003-12-12 10:09
带的开发帮助里查找rotate,把那些方法都看看吧,相信会有结果
|
|
4楼#
发布于:2003-12-12 10:11
object.RotateSet (features, Origin, Angle )
|
|