AnsweredAssumed Answered

Determining symbol size for Symbol.CreateSwatchAsync

Question asked by mvanderveeken on May 11, 2016
Latest reply on May 11, 2016 by akajanus-esristaff

I need to render a Symbol to an Image(Source). For that I can use Symbol.CreateSwatchAsync. There is no overload that would determine the size of the rendered image automatically (Symbol.CreateSwatchAsync Method without any parameters defaults to 32x32 pixels with 96 dpi, which also throws an NotImplementedException when used?).

 

Some symbols need to be rendered at a larger size than others (for instance symbols that depend their size on an attribute value). I do not know up front what type of symbol I need to generate the image for (could be a simple one, or a size dependant one).

 

Questions:

- Is there a way to determine the actual rendered size for a symbol upfront so it can be passed into Symbol.CreateSwatchAsync?

- Is there some other smart way to render symbols, independent of size?

 

Thanks!

Outcomes