开发者

Meaning of some Paint constants in Android

开发者 https://www.devze.com 2023-02-05 08:37 出处:网络
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:

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

Is 'subpixel' mode something close to ClearType or is it开发者_Python百科 something altogether different?


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.

0

精彩评论

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