Code example for Paint

Methods: setAntiAliassetDithersetFilterBitmapsetSubpixelTextsetTypeface

0
 
	public ExternalFilterPackDrawable( String title, String shortTitle, int numEffects, int color, Typeface typeFace, Bitmap shadow,
			Bitmap effect ) {
		super(); 
		mMatrix = new Matrix();
		mPaint = new Paint( Paint.ANTI_ALIAS_FLAG );
		mPaint.setSubpixelText( true );
		mPaint.setAntiAlias( true );
		mPaint.setDither( true );
		mPaint.setFilterBitmap( true );
 
		bitmapWidth = effect.getWidth();
		bitmapHeight = effect.getHeight();
 
		Log.d( "xxx", "size: " + bitmapWidth + "x" + bitmapHeight );
 
		xRatio = (float) defaultWidth / bitmapWidth;
		yRatio = (float) defaultHeight / bitmapHeight;
 
		mShadowBitmap = new WeakReference<Bitmap>( shadow );
		mEffectBitmap = new WeakReference<Bitmap>( effect );
 
		mTitle = title;
		mShortTitle = shortTitle;
		mNumEffects = numEffects < 0 ? 6 : numEffects;
		mColor = color;
 
		if ( null != typeFace ) {
			mPaint.setTypeface( typeFace );
		} 
	} 
 
	@Override 
	protected void finalize() throws Throwable { 
Contextual code suggestions in your IDE  Get Codota for Java