ios - Swift UI - 旋转后提高文本质量?
问题描述
在 Text() 视图上使用 .rotationEffect 后,它实际上使文本看起来不那么清晰和模糊。我认为这是因为它被光栅化了,但是我想知道是否有办法解决这个问题,或者在文本经历旋转效果后提高文本质量的方法?
ZStack{
Image("tile_empty")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(minWidth: 0, maxWidth: 250, minHeight: 0, maxHeight: 250)
.rotationEffect(.degrees(120.0 * Double(i) + 30))
Text("\(self.globals.levels[self.globals.currentLevel].tiles[self.tilesIndex].subTiles[i].word)")
.font(Font.custom("Prime", size: ScreenSize.screenWidth * 0.04))
.foregroundColor(.init(hex: "F2E9E4"))
.fontWeight(.semibold)
.rotationEffect(.degrees(-120.0 * Double(i) + -30))<----- Causes blurry text
}
解决方案
推荐阅读
- verilog - ModelSim 中的错误,“=”附近:语法错误,意外的“=”。在“Y”之后的范围内发现语法错误。是否缺少'::'?
- python - 解决 AWS Glue 中的并发限制
- eclipse - 在 STS 和 Eclipse 中调试?
- javascript - Firebase:从存储中获取 JSON 文件的内容
- java - 无法定位元素:{"method":"xpath","selector":"path"}
- python - 带代理的 Selenium Webdriver
- azure - SSL 证书问题:无法获取本地颁发者证书 AZURE DEVOPS
- python - 如何在 Python 中一一访问 3D numpy 数组的所有列?
- ios - iOS 14.5 - [Assert] 有人在搜索栏可见时删除了活动的搜索控制器
- python - 使用 selenium .click() 时,“到达日期”按钮没有反应