用AE如何实现在AxSceneControl里面实现鹰眼啊?
就是AxSceneControl作为主窗口,鹰眼窗口是AxMapControl。麻烦高手指教啊,谢谢!...
就是AxSceneControl作为主窗口,鹰眼窗口是AxMapControl。
麻烦高手指教啊,谢谢! 展开
麻烦高手指教啊,谢谢! 展开
1个回答
2013-03-19
展开全部
((IGlobeDisplayEvents_Event)this.axGlobeControl1.Globe.GlobeDisplay).AfterDraw += new IGlobeDisplayEvents_AfterDrawEventHandler(OnAfterDraw);
void OnAfterDraw(ISceneViewer pViewer) {
IGraphicsContainer pGra = axMapControl1.Map as IGraphicsContainer; IActiveView pAv = pGra as IActiveView;
// 在绘制前,清除 axMapControl1 中的任何图形元素
pGra.DeleteAllElements();
IRectangleElement pRectangleEle = new RectangleElementClass();
IElement pEle = pRectangleEle as IElement;
// pEle.Geometry = Get_VisibleGeographicExtent(this.axGlobeControl1.Globe);
// 设置鹰眼图中的红线框
IRgbColor pColor = new RgbColorClass();
pColor.Red = 255;
pColor.Green = 0;
pColor.Blue = 0;
pColor.Transparency = 25;
// 产生一个线符号对象
ILineSymbol pOutline = new SimpleLineSymbolClass();
pOutline.Width = 2;
pOutline.Color = pColor;
// 设置颜色属性
pColor = new RgbColorClass();
pColor.Red = 255;
pColor.Green = 0;
pColor.Blue = 0;
pColor.Transparency = 0;
// 设置填充符号的属性
IFillSymbol pFillSymbol = new SimpleFillSymbolClass();
pFillSymbol.Color = pColor;
pFillSymbol.Outline = pOutline;
IFillShapeElement pFillShapeEle = pEle as IFillShapeElement;
pFillShapeEle.Symbol = pFillSymbol;
pGra.AddElement((IElement)pFillShapeEle, 0);
// 刷新
pAv.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
pEle.Geometry = Get_VisibleGeographicExtent(this.axGlobeControl1.Globe);
}
void OnAfterDraw(ISceneViewer pViewer) {
IGraphicsContainer pGra = axMapControl1.Map as IGraphicsContainer; IActiveView pAv = pGra as IActiveView;
// 在绘制前,清除 axMapControl1 中的任何图形元素
pGra.DeleteAllElements();
IRectangleElement pRectangleEle = new RectangleElementClass();
IElement pEle = pRectangleEle as IElement;
// pEle.Geometry = Get_VisibleGeographicExtent(this.axGlobeControl1.Globe);
// 设置鹰眼图中的红线框
IRgbColor pColor = new RgbColorClass();
pColor.Red = 255;
pColor.Green = 0;
pColor.Blue = 0;
pColor.Transparency = 25;
// 产生一个线符号对象
ILineSymbol pOutline = new SimpleLineSymbolClass();
pOutline.Width = 2;
pOutline.Color = pColor;
// 设置颜色属性
pColor = new RgbColorClass();
pColor.Red = 255;
pColor.Green = 0;
pColor.Blue = 0;
pColor.Transparency = 0;
// 设置填充符号的属性
IFillSymbol pFillSymbol = new SimpleFillSymbolClass();
pFillSymbol.Color = pColor;
pFillSymbol.Outline = pOutline;
IFillShapeElement pFillShapeEle = pEle as IFillShapeElement;
pFillShapeEle.Symbol = pFillSymbol;
pGra.AddElement((IElement)pFillShapeEle, 0);
// 刷新
pAv.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
pEle.Geometry = Get_VisibleGeographicExtent(this.axGlobeControl1.Globe);
}
VSH艾羽
2024-10-27 广告
2024-10-27 广告
ANSYS是一款功能强大的有限元分析软件,广泛应用于航空航天、汽车、电子、能源等多个领域。它能够进行结构、流体、热、电磁等多物理场的仿真分析,支持复杂的几何建模、高效的网格划分和多种求解器,帮助工程师优化产品设计,减少开发成本,提高生产效率...
点击进入详情页
本回答由VSH艾羽提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询