axGlobeControl1标绘文本
来源:互联网 发布:淘宝摄影师的要求 编辑:程序博客网 时间:2024/04/29 06:54
static IGraphicsLayer m_GraphLayer = null;
public static void Draw3DText(IGlobe pGlobe, double thisx, double thisy, string text, int Fsize, int red, int green, int blue)
{
if (m_GraphLayer != null)
{
IGraphicsContainer3D pGC3Da = (IGraphicsContainer3D)m_GraphLayer;
pGC3Da.DeleteAllElements();
pGlobe.GlobeDisplay.RefreshViewers();
}
if (m_GraphLayer == null)
{
m_GraphLayer = (IGraphicsLayer)new GlobeGraphicsLayer();
ILayer thisilayer = (ILayer)m_GraphLayer;
thisilayer.Name = "zapzqc";
pGlobe.AddLayerType(thisilayer, esriGlobeLayerType.esriGlobeLayerTypeUnknown, true);
}
IGlobeGraphicsLayer pGL = (IGlobeGraphicsLayer)new GlobeGraphicsLayer();
pGL = (IGlobeGraphicsLayer)m_GraphLayer;
IPoint point = new PointClass();
point.PutCoords(thisx, thisy);
point.Z = 300;//控制字距离该坐标点的高度,zapzqc
IText3DElement Ptext3DElement = new Text3DElementClass();
Ptext3DElement.AnchorPoint = point;
Ptext3DElement.Text = text;
Ptext3DElement.BoldFont = true;
Ptext3DElement.Alignment = esriT3DAlignment.esriT3DAlignHorizontal;
Ptext3DElement.AxisRotation = esriT3DRotationAxis.esriT3DRotateAxisZ;
Ptext3DElement.ZAxisScale = 1;
Ptext3DElement.Justification = esriT3DJustification.esriT3DJustifyCenter;
Ptext3DElement.Height = Fsize;
//改变字体颜色,zapzqc
IRgbColor Fcolor = new RgbColorClass();
Fcolor.Red = red;
Fcolor.Blue = blue;
Fcolor.Green = green;
IFillSymbol pFillSymbol = new SimpleFillSymbol();
pFillSymbol.Color = Fcolor;
IFillShapeElement pFillShapeElement = Ptext3DElement as IFillShapeElement;
pFillShapeElement.Symbol = pFillSymbol;
IGraphicsContainer3D pGC3D = (IGraphicsContainer3D)new GlobeGraphicsLayer();
pGC3D = (IGraphicsContainer3D)m_GraphLayer; //让m_GraphLayer获得Container
pGC3D.AddElement(pFillShapeElement as IElement);
pGlobe.GlobeDisplay.RefreshViewers();
}
public static void Draw3DText(IGlobe pGlobe, double thisx, double thisy, string text, int Fsize, int red, int green, int blue)
{
if (m_GraphLayer != null)
{
IGraphicsContainer3D pGC3Da = (IGraphicsContainer3D)m_GraphLayer;
pGC3Da.DeleteAllElements();
pGlobe.GlobeDisplay.RefreshViewers();
}
if (m_GraphLayer == null)
{
m_GraphLayer = (IGraphicsLayer)new GlobeGraphicsLayer();
ILayer thisilayer = (ILayer)m_GraphLayer;
thisilayer.Name = "zapzqc";
pGlobe.AddLayerType(thisilayer, esriGlobeLayerType.esriGlobeLayerTypeUnknown, true);
}
IGlobeGraphicsLayer pGL = (IGlobeGraphicsLayer)new GlobeGraphicsLayer();
pGL = (IGlobeGraphicsLayer)m_GraphLayer;
IPoint point = new PointClass();
point.PutCoords(thisx, thisy);
point.Z = 300;//控制字距离该坐标点的高度,zapzqc
IText3DElement Ptext3DElement = new Text3DElementClass();
Ptext3DElement.AnchorPoint = point;
Ptext3DElement.Text = text;
Ptext3DElement.BoldFont = true;
Ptext3DElement.Alignment = esriT3DAlignment.esriT3DAlignHorizontal;
Ptext3DElement.AxisRotation = esriT3DRotationAxis.esriT3DRotateAxisZ;
Ptext3DElement.ZAxisScale = 1;
Ptext3DElement.Justification = esriT3DJustification.esriT3DJustifyCenter;
Ptext3DElement.Height = Fsize;
//改变字体颜色,zapzqc
IRgbColor Fcolor = new RgbColorClass();
Fcolor.Red = red;
Fcolor.Blue = blue;
Fcolor.Green = green;
IFillSymbol pFillSymbol = new SimpleFillSymbol();
pFillSymbol.Color = Fcolor;
IFillShapeElement pFillShapeElement = Ptext3DElement as IFillShapeElement;
pFillShapeElement.Symbol = pFillSymbol;
IGraphicsContainer3D pGC3D = (IGraphicsContainer3D)new GlobeGraphicsLayer();
pGC3D = (IGraphicsContainer3D)m_GraphLayer; //让m_GraphLayer获得Container
pGC3D.AddElement(pFillShapeElement as IElement);
pGlobe.GlobeDisplay.RefreshViewers();
}
- axGlobeControl1标绘文本
- Flex 协同标绘
- ArcGISPlotSilverlightAPI的标绘功能
- C#Arcgis engine 获取axGlobeControl1的地理经纬度
- 地图标绘(点线面)
- javascript标绘工具资料搜集
- ArcGIS for Android 体验(二) 绘制标绘
- ArcGIS for Android 体验(二) 绘制标绘
- GIS协同标绘会议系统全新上线
- GIS标绘与插值算法原理
- 动态标绘演示系统1.0(for OpenLayers3)
- ArcGIS for Android 体验(二) 绘制标绘
- 基于OpenLayers3的标绘API 开源啦
- 点线面如何标绘在地图上
- 地图动态标绘--C/S应用
- SuperMap iObjects c++二维标绘(一)
- ArcGIS for Android示例解析之标绘-----DrawGraphicElements
- Flex 图形标绘——线条、箭头的绘制
- RMQ问题
- 批量录入
- PHP连接数据库
- #include<iostream>与#include<iostream.h>以及#inclue<string> 和 #include<string.h>的区别
- 利用新浪sae,搭建自己的应聘简历!
- axGlobeControl1标绘文本
- 截取JPanel的部分内容并保存为图片
- easyui datagrid显示不了文本文件中的JSON数据。
- Android的MediaRecorder架构介绍
- C++ vector容器类型
- e-企业管理解决方案-功能模块组合应用
- 内置类型和结构体类型作为函数参数传递时的共同点
- Win7与Ubuntu双系统安装
- About-C