zlgforever
路人甲
路人甲
  • 注册日期2006-10-14
  • 发帖数11
  • QQ
  • 铜币164枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1433回复:2

如何用turetype字体显示点符号?

楼主#
更多 发布于:2007-04-23 14:27
如何将点显示为truetype字体中的符号?
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15951
  • QQ
  • 铜币25345枚
  • 威望15368点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2007-04-23 20:48
<P>使用ICharacterMarkerSymbol Interface</P>
<P>例子:</P>
<P> '** Set some Variables<BR>Dim chMrkSym As ICharacterMarkerSymbol<BR>Set chMrkSym = New CharacterMarkerSymbol<BR>Dim aFont As IFontDisp<BR>Set aFont = New StdFont<BR>Dim aColor As IRgbColor<BR>Set aColor = New RgbColor<BR><BR>'** Define the color we want to use<BR>aColor.Red = 255<BR>aColor.Green = 0<BR>aColor.Blue = 0<BR><BR>'** Define the Font we want to use<BR>aFont.Name = "ESRI Default Marker"<BR>aFont.Size = 24<BR><BR><BR>'** Set the CharacterMarkerSymbols Properties<BR>With chMrkSym<BR>     .Angle = 90<BR>     .CharacterIndex = 36<BR>     .Color = aColor<BR>     .Font = aFont<BR>     .Size = 24<BR>     .XOffset = 0<BR>     .YOffset = 0<BR>End With <BR></P>
GIS麦田守望者,期待与您交流。
举报 回复(0) 喜欢(0)     评分
zlgforever
路人甲
路人甲
  • 注册日期2006-10-14
  • 发帖数11
  • QQ
  • 铜币164枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2007-04-24 13:36
找不到字体文件!
<P> '** Set some Variables<BR>        Dim pRender As IUniqueValueRenderer<BR>        Dim chMrkSym As ICharacterMarkerSymbol<BR>        chMrkSym = New CharacterMarkerSymbol<BR>        Dim aFont As IFontDisp<BR>        aFont = New StdFont<BR>        Dim aColor As IRgbColor<BR>        aColor = New RgbColor<BR>        Try<BR>            Dim i As Integer<BR>            pFtLayer = Form1.AxMapControl1.Map.Layer(i)<BR>            If pFtLayer.FeatureClass.ShapeType = ESRI.ArcGIS.Geometry.esriGeometryType.esriGeometryPoint Then<BR>                '** Define the color we want to use<BR>                aColor.Red = 255<BR>                aColor.Green = 0<BR>                aColor.Blue = 0</P>
<P>                '** Define the Font we want to use<BR>                aFont.Name = "gx"<BR>                aFont.Size = 24</P>
<P>                '** Set the CharacterMarkerSymbols Properties<BR>                With chMrkSym<BR>                    .Angle = 90<BR>                    .CharacterIndex = 34<BR>                    .Color = aColor<BR>                    .Font = aFont<BR>                    .Size = 24<BR>                    .XOffset = 0<BR>                    .YOffset = 0<BR>                End With<BR>                pRender = New UniqueValueRenderer<BR>                pRender.FieldCount = 1<BR>                pRender.Field(0) = "COMPONENT"             'COMPONENT<BR>                pRender.DefaultSymbol = chMrkSym<BR>            End If<BR>        Catch e As Exception<BR>            MsgBox(Err.Description)<BR>            pColor = Nothing<BR>            pRender = Nothing<BR>            chMrkSym = Nothing<BR>            SetSdeLayerDispProperties1 = False<BR>        End Try</P>
<P>我把代码写成这样,可还是不行,我看可能是找不到字体文件,或是渲染不成功,哪位帮帮忙!</P><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em02.gif" />
举报 回复(0) 喜欢(0)     评分
游客

返回顶部