zjie8108
路人甲
路人甲
  • 注册日期2003-09-17
  • 发帖数93
  • QQ
  • 铜币453枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1628回复:1

delphi+MO中InterSect函数的参数问题

楼主#
更多 发布于:2004-08-13 10:14
delphi+MO中InterSect函数的参数问题:不知道怎么使用这个InterSect函数啊
在VB中是这样的,Ploy:=Poly1.InterSect(Poly2),那在Delphi中这段代码到底是怎样的呢?希望各位大虾回答啊,急。
喜欢0 评分0
zjqliufred
路人甲
路人甲
  • 注册日期2005-09-21
  • 发帖数6
  • QQ
  • 铜币179枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2006-08-01 15:54
<TABLE fixed; WORD-BREAK: break-all" height="85%" width="95%" align=center border=0>

<TR>
<TD 9pt; LINE-HEIGHT: 12pt" vAlign=top width=* height="100%"><IMG src="http://www.lcgis.net/BBS/Skins/Default/topicface/face1.gif"> <B></B><BR>
<P>两条线相交的情况,主要是Intesect方法的参数,和返回值难以设置,程序写的不是很好,<BR>var pInterSect:variant;<BR>………………<BR>    pInterSect:=templine.Intersect(shape,shape.Extent);<BR>//没有交点    <BR>if IDispatch(pIntersect)=nil then<BR>    begin<BR>      exit;<BR>    end;<BR>//一个交点<BR>if (pInterSect.shapetype)=moShapeTypePoint then<BR>    begin<BR>      Pnt:=IMOpoint(Createoleobject('Mapobjects2.Point'));<BR>      pnt:=IMOPoint(IDispatch(pInterSect));<BR>    end<BR>//多个交点<BR>    else if (pInterSect.shapetype)=moShapeTypeMultipoint  then<BR>    begin<BR>      Pnts:=IMOPoints(CreateOleObject('MapObjects2.Points'));<BR>      Pnts:=IMOPoints(Idispatch(pInterSect));<BR>    end;<BR>//相交的结果是一条线<BR>……</P></TD></TR></TABLE>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部