ThinkGeo.com    |     Documentation    |     Premium Support

White background for text/labels

Quite a few users have said they are not keen on the halo effect on text, like used on labels, and would like a solid white background instead. Is that currently possible or likely to be available in the near future?

Thanks,
Jonathan

Hi @Jonathan3,

I assume your current TextStyle code is using the HaloPen property, correct? If that’s the case, then just use the Mask property instead and set it to an AreaStyle like:

Mask = new AreaStyle(GeoBrushes.White)

Let us know how that works.

Thanks,
John

Hi John, yes using the halo pen at the moment and have now tried with the mask. Overall pretty good but some issues with it not matching the text, as we have a custom text style that resizes / rotates and aligns and that seems to throw it a bit.

I add a call to .DrawMask( … ); in DrawCore before canvas.DrawText( … )

Jonathan

Hi @Jonathan3,

So, after you added a call to .DrawMask() is it working, or are you still having some issues?

If you are, can you post a sample .sln that demonstrates the issue, or email it to support@thinkgeo.com and we’ll take a look.

Thanks,
John