You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use THLabel to create a solid white background around my label that follows the shape of the text. It looks fine mostly, but some letters can cause holes in the stroke's shape, which makes it a bit ugly.
The following image shows the problem with the letter 'i':
Hi!
I'm trying to use THLabel to create a solid white background around my label that follows the shape of the text. It looks fine mostly, but some letters can cause holes in the stroke's shape, which makes it a bit ugly.
The following image shows the problem with the letter 'i':
And the desired output would be:
I've come up with a temporary solution, but it's probably not the most optimal. In the
strokeImageWithRect
function I've applied a 1px white shadow on the clipping mask, then used this idea to "remove" the opacity of the blurred shadow edges: https://stackoverflow.com/questions/14622202/can-cgcontextcliptomask-mask-all-non-transparent-pixels-with-alpha-1I wonder if there's any better way of filling the holes directly on the clipping mask's path, without using a shadow.
The text was updated successfully, but these errors were encountered: