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.
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)
iMM.QueryMarkerMask(pAV.ScreenDisplay.hDC, iDRet, iGShape, iPG);
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?