The value of some Paint constants in Android

There are several Paint constants in Android that I could not find much information about. Can someone help me with a little explanation of these flags:

  • LINEAR_TEXT_FLAG
  • SUBPIXEL_TEXT_FLAG
  • FILTER_BITMAP_FLAG

Is the "subpixel" something close to ClearType or is it something completely different?

+5
source share
1 answer

SUBPIXEL is valid for sub-pixel anti-aliasing, which is currently not supported on Android. Setting this sign will have no effect. FILTER_BITMAP is used to apply bilinear filtering to raster images when converting them (for example, it is scaled). It is generally recommended that you enable FILTER_BITMAP if speed is not (much) more important than quality. LINEAR_TEXT is used to draw text with a text size of 64px with a zoom factor set to your textSize / 64.

+8
source

All Articles