You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects Visual Basic for Application (VBA) forum

Creating a halo mask around text annotation...   Jonathan M May 21, 2007
Re: Creating a halo mask around text annota...   Jonathan M May 21, 2007
Re: Creating a halo mask around text annota...   Mike Wilhelm Aug 07, 2007
Re: Creating a halo mask around text annota...   Jerry Faust Aug 11, 2007
Re: Creating a halo mask around text annota...   Ben Witt Sep 24, 2009
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Creating a halo mask around text annotation layer 
Author Jonathan M 
Date May 21, 2007 
Message I have a script that generates a map with street lines and enables annotation, so that the titles can be displayed. I would, however, like to set a 1 pixel white "halo" mask around it, so that the street titles are easier to read.

So, my question: for an IGeoFeatureLayer, how can you modify the symbology of the annotation so that the annotation has a mask?

All I've figured out so far is to set "pGFLayer.DisplayAnnotation = True"

Thank you for your time. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Creating a halo mask around text annotation layer 
Author Jonathan M 
Date May 21, 2007 
Message never mind -- I figured it out 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Creating a halo mask around text annotation layer 
Author Mike Wilhelm 
Date Aug 07, 2007 
Message I ran into the same problem and am interested in how you created the masks. Thanks. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Creating a halo mask around text annotation layer 
Author Jerry Faust 
Date Aug 11, 2007 
Message For the benefit of those (like me) who were also looking for the solution, here it is (figured out by borrowing pieces of other similar postings). This is a relatively simple solution for halos around the existing labels, not specifically an annotation layer. 
 
' turn on annotation
pGeoFeatureLayer.DisplayAnnotation = True
Dim pAnnoLayerPropsColl As IAnnotateLayerPropertiesCollection
' get existing annotation properties collection
pAnnoLayerPropsColl = pGeoFeatureLayer.AnnotationProperties
' get the (first) AnnotateLayerProperties property set in the collection
Dim pAnnoLayerProps As IAnnotateLayerProperties
pAnnoLayerPropsColl.QueryItem(0, pAnnoLayerProps, Nothing, Nothing)
' QI to the LabelEngineLayerProperties interface
Dim pLabelEngineLayerProps As ILabelEngineLayerProperties
pLabelEngineLayerProps = CType(pAnnoLayerProps, ILabelEngineLayerProperties)
' get reference to existing text symbol 
Dim pTextSymbol As ITextSymbol = pLabelEngineLayerProps.Symbol
' QI to IMask interface of text symbol
Dim pMask As IMask = CType(pTextSymbol, IMask)
' set the mask properties
pMask.MaskSize = 1
pMask.MaskStyle = esriMaskStyle.esriMSHalo

' Note that you could also tweak the text properties here
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Creating a halo mask around text annotation layer 
Author Ben Witt 
Date Sep 24, 2009 
Message How does one use this code on an annotation feature set?

Alternatively, is there a tool that would do this now?