swimer123
路人甲
路人甲
  • 注册日期2003-10-15
  • 发帖数25
  • QQ
  • 铜币127枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1716回复:1

旋转,急!

楼主#
更多 发布于:2003-12-11 16:19
请问各位:在AO的独立开发中,旋转是如何实现的?谢了!
喜欢0 评分0
gis1117
  • 注册日期
  • 发帖数
  • QQ
  • 铜币
  • 威望
  • 贡献值
  • 银元
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.
举报 回复(0) 喜欢(0)     评分
swimer123
路人甲
路人甲
  • 注册日期2003-10-15
  • 发帖数25
  • QQ
  • 铜币127枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2003-12-12 08:58
首先感谢GIS先生的回答,但我说的旋转是旋转选中的ELEMENT或FEATURE,而不是旋转DISPLAY,有没有相关的列子呢?
举报 回复(0) 喜欢(0)     评分
gis1117
  • 注册日期
  • 发帖数
  • QQ
  • 铜币
  • 威望
  • 贡献值
  • 银元
3楼#
发布于:2003-12-12 10:09
带的开发帮助里查找rotate,把那些方法都看看吧,相信会有结果
举报 回复(0) 喜欢(0)     评分
gis1117
  • 注册日期
  • 发帖数
  • QQ
  • 铜币
  • 威望
  • 贡献值
  • 银元
4楼#
发布于:2003-12-12 10:11
object.RotateSet (features, Origin, Angle )
举报 回复(0) 喜欢(0)     评分
游客

返回顶部