Hi,
I have created a tool in C# in order to create Mask symbol around the symbol feature.
To do that, I use the IMarkermask interface and the QueryMarkerMask function.
Like this:
IGeoFeatureLayer iGFL = iL as IGeoFeatureLayer;
if (iGFL != null)
{
IFeatureRenderer iFR = iGFL.Renderer;
if (iFR != null)
{
IPolygon iPG = new PolygonClass();
ISymbol iS = iFR.get_SymbolByFeature(iF);
if (iS != null)
{
IMarkerMask iMM = iS as IMarkerMask;
if (iMM != null)
{
IGeometry iGShape = iF.ShapeCopy;
if (iGShape != null)
{
iGShape.Project(ESRI_Constant.Object._FocusMap.SpatialReference);
pAV.ScreenDisplay.StartDrawing(pAV.ScreenDisplay.hDC, 0);
iMM.QueryMarkerMask(pAV.ScreenDisplay.hDC, iDRet, iGShape, iPG);
pAV.ScreenDisplay.FinishDrawing();
It works fine for a layer with a classic symbology.
But if the layer use a Representation as symbology, this code doesn't work: the line ISymbol iS = iFR.get_SymbolByFeature(iF) return null.
How can I get an ISymbol from a feature using an IRepresentationRenderer?
Or, more generally, how can I get a mask geometry for a Marker representation?
Thanks!
Best regards