在Android的一些油漆常数的含义 [英] Meaning of some Paint constants in Android
问题描述
有一些涂料不断在Android中,对此,我无法找到很多信息。谁能帮我稍微解释一下关于这些标志:
There are a few Paint constant in Android about which I couldn't find much info. Could anyone help me with a bit of explanation about those flags:
- LINEAR_TEXT_FLAG
- SUBPIXEL_TEXT_FLAG
- FILTER_BITMAP_FLAG
时的子像素模式,一些接近的ClearType或者是一个完全不同的?
Is 'subpixel' mode something close to ClearType or is it something altogether different?
推荐答案
SUBPIXEL的确是子像素抗锯齿,这是目前不支持Android系统。设置此标志将没有任何效果。 FILTER_BITMAP用于双线性过滤应用到他们的位图转化时(比例为实例。)它通常是一个好主意,让FILTER_BITMAP除非速度的问题(多)比质量。 LINEAR_TEXT是用在与设置为您TEXTSIZE / 64的比例因子一64PX文本大小绘制文本。
SUBPIXEL is indeed for sub-pixel antialiasing, which is currently not supported on Android. Setting this flag will have no effect. FILTER_BITMAP is used to apply bilinear filtering to bitmaps when they are transformed (scaled for instance.) It's usually a good idea to enable FILTER_BITMAP unless speed matters (much) more than quality. LINEAR_TEXT is used to draw text at a 64px text size with a scale factor set to your textSize/64.
这篇关于在Android的一些油漆常数的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!