iPhone - 使用 CGContext 绘制一些文本:好的但是...镜像
当我使用 CGContext 绘制一些文本时,它是镜像绘制的。
我尝试应用一些变换,然后它画得很好,但随后绘图的其余部分和所有坐标似乎都画得很糟糕。
我尝试在绘制文本(并应用转换)之前和之后保存和恢复上下文,但这没有帮助。
如何使用 CGContext 将一些文本绘制到视图上,而不影响绘图的其余部分,也不影响该文本的屏幕 CGPoint 坐标?
When I draw some text using CGContext, it is drawn mirrored.
I tried to apply some transformations, then it is draw well, but then the rest of the drawing and all coordinates seems to be draw bad.
I tried to save and restore the context, before and ater drawing the text (and aplying transformation), but that does not help.
How some text must be drawn onto a View using CGContext without affecting the rest of the drawing, nor the onscreen CGPoint coords for that text ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您能澄清一下“镜像”是什么意思吗?这是一些用于绘制黑色文本的代码。它不应该是“镜像”的。
Can you clarify what you mean as 'mirrored'? Here is some code for drawing some black text. It should not be 'mirrored'.
我认为你必须反转文本矩阵:
I think you have to reverse the text matrix :