Closed jowie closed 9 years ago
I've done a bit more research and it looks like it's got something to do with the premultiplied alpha... That is, it doesn't appear to be doing the premultiplied bit for some reason. If I run the same code in a UIKit application using UIGraphicsGetCurrentContext()
then it works fine.
I've found a couple of possible ways to fix this... Please see http://stackoverflow.com/questions/26406551/why-am-i-getting-a-black-line-around-my-32-bit-context-in-cocos2d/26407669#26406872
To put that in context, because I'm not sure what you mean: Are you using THLabel in cocos2d? Or what do you mean by a "non-UIKit" application? Could you send me an example project to tobias.hagemann@gmail.com? That would be great!
@jowie How do you use it in cocos2d? Why don't you use other more reasonable solutions in OpenGL context, like TTF renderer or pre-rendered bitmap font?
Sorry, I haven't been checking my messages. I don't believe I ever said "non-UIKit application"...?
I'm afraid I won't be able to help on this subject much anymore, as I have left the company I was doing the project for. Sorry!
No problem! You said something about "If I run the same code in a UIKit application [...]" and linked to a cocos2d stackoverflow answer. That's why I thought you were talking about a "non-UIKit application".
Now it's coming back to me... Sorry it's been a while. Yes, when I said "UIKit Application", I meant an app that wasn't using cocos2d. I'm not entirely sure now why we weren't using a different solution for cocos2d, so I would ignore my ramblings now!
Alright, thanks for the info though! :)
If I render a white THLabel above a white background, you can see it adding a thin black line around the text. This also means that text rendered small will become thinner and disappear quicker than it should.