欢迎您来到GIS动力

加入收藏 免费注册 用户登陆 帮助中心
首页 新闻动态 技术专栏 银杏树下 学习考研 软件下载 求职招聘 许愿瓶 节日祝福 用户中心 精彩推荐 资源搜索 地图
专栏导航: AO开发 | SO开发 | ArcGIS桌面 | 超图桌面 | 开发语言 | 数据库 | WebGIS | 银杏文学 | 研究生考题 | FreeMap FreeTalk
   您现在位于: 首页技术专栏ArcGIS应用与开发AO开发 → 正文
使用API在Scene或Globe中画橡皮条线
08-05-30 12:58:13 作者:王者之魂 出处:wall.cnblogs.com

在Scene或Globe中绘制橡皮条线的工具,其中wsUtilityBaseTool是我自己封装的基类,
大家只需要把它替换成AE的BaseTool,把其中相应的代码放在相应的函数中,然后再进行一些简单的修改就好了
附上VB.Net源码

Imports ESRI.ArcGIS.Analyst3D
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.Controls
Imports ESRI.ArcGIS.Display
Imports ESRI.ArcGIS.Geometry
Imports ESRI.ArcGIS.GlobeCore
Imports ESRI.ArcGIS.SystemUI

Public Class wsSceneDrawLine
  Inherits wsUtilityBaseTool

  Private Declare Function Polygon Lib "gdi32" (ByVal hDC As Integer, ByVal lpPoint As Integer, ByVal nCount As Integer) As Integer
  Private Declare Function SetCapture Lib "USER32" (ByVal hWnd As Integer) As Integer
  Private Declare Function GetCapture Lib "USER32" () As Integer
  Private Declare Function ReleaseCapture Lib "USER32" () As Integer
  Private Declare Function GetCursorPos Lib "USER32" (ByVal lpPoint As PointAPI) As Integer
  Private Declare Function SetCursor Lib "USER32" (ByVal hCursor As Integer) As Integer
  Private Declare Function GetClientRect Lib "USER32" (ByVal hWnd As Integer, ByVal lpRect As rect) As Integer
  Private Declare Function GetWindowRect Lib "USER32" (ByVal hWnd As Integer, ByVal lpRect As rect) As Integer
  Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Integer, ByVal nWidth As Integer, ByVal crColor As Integer) As Integer
  Private Declare Function GetStockObject Lib "gdi32" (ByVal nIndex As Integer) As Integer
  Private Declare Function GetROP2 Lib "gdi32" (ByVal hDC As Integer) As Integer
  Private Declare Function SetROP2 Lib "gdi32" (ByVal hDC As Integer, ByVal nDrawMode As Integer) As Integer
  Private Declare Function Rectangle Lib "gdi32" (ByVal hDC As Integer, ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) As Integer
  Private Declare Function SelectObject Lib "gdi32" (ByVal hDC As Integer, ByVal hObject As Integer) As Integer
  Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Integer) As Integer
  Private Declare Function Polyline Lib "gdi32" (ByVal hDC As Integer, ByVal lpPoint() As PointAPI, ByVal nCount As Integer) As Integer
  Private Declare Function CreatePolygonRgn Lib "gdi32" (ByVal lpPoint As Integer, ByVal nCount As Integer, ByVal nPolyFillMode As Integer) As Integer
  Private Structure rect
    Dim Left As Integer
    Dim Top As Integer
    Dim Right As Integer
    Dim Bottom As Integer
  End Structure
  Private Structure PointAPI
    Dim x As Integer
    Dim y As Integer
  End Structure

9 7 3 1 2 3 4 5 4 8 :

(本文已被浏览 次)
发布人:admin
推荐给好友:发送给好友
上篇新闻:
下篇新闻:
相关评论
发表我的评论
  • 尊重网上道德,遵守《全国人大常委会关于维护互联网安全的决定》及中华人民共和国其他各项有关法律法;
  • 本站有权保留或删除您发表的任何评论内容;
  •   相关文章  
    Scenecontrol中滚轮的缩放实现 
    AXSceneControl汽车沿着pollyline行驶
    基于AE(SceneControl)的要素信息查询源代码
    EV-Globe新一代海量空间信息服务平台

    关于我们友情链接 ┋ 与我在线 ┋ 管理 ┋ TOP
     
    网站当前版本:GisPower CMS V3.0
    『GIS 动力』- http://www.gispower.org/
    联系我们:webmaster#gispower.org
    Copyright (c) 2003-2007 GisPOwer.Org. All Rights Reserved.
     

                   滇ICP备05006901号