Android上的setFilterMap有什么作用?
我正在为 Android 开发动态壁纸。尽管位图的源质量很高,但在屏幕上绘制位图会使边缘看起来非常锯齿状。经过在互联网上的一些搜索和一些随机实验,我发现使用 Paint.setFilterMap(true) 渲染的位图没有任何锯齿状边缘(尽管它确实对性能造成了相当严重的影响)。
我在文档中找到了这样的解释:“过滤会影响位图转换时的采样。”
谁能解释一下这是什么意思?也欢迎任何其他有关绘制平滑位图的建议。
I was working on a livewallpaper for Android. Drawing the Bitmap on the screen made the edges look very jagged, even though the source of the bitmap was of high quality. After some searches on the internet and some random experiments, I found that using paint.setFilterMap(true)
rendered the bitmap without any jagged edges(although it did hit performance pretty badly).
I found this explanation in the documentation: "Filtering affects the sampling of bitmaps when they are transformed."
Can anyone explain what that means? Also any other suggestions for drawing smooth bitmaps are welcome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论