开发者

How to align an 90 deg rotated label perfectly with the pixels?

When rotating a label, the text is rendered very ugly. Is there an convenient way to get the label aligned with the pixels? Maybe there is some way of rou开发者_如何学Gonding the transform of the view, so that it isn't misaligned?


If you use CGAffineTransformRotate or a similar function you won't see any artifacts in the text because the label is drawn first and then rotated in its entirety.

If you are seeing artifacts using a transform, then the most likely source is a transparent label background distorting the appearance of the text. If the background is variable, such as pin stripe or a picture, then rotating the text will put different pixels adjacent to the text which can muddle its outline and apparent color.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜