Android EmbossMaskFilter - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android EmbossMaskFilter class.

This code example shows how to use the following methods: setMaskFilter
		/* 
		 * Trick for inner shadow, see here: 
		 * http://wiresareobsolete.com/wordpress/2012/04/textview-inner-shadows/ 
		 */ 
		float[] direction = new float[] { 0f, -1.0f, 0.5f };
		MaskFilter filter = new EmbossMaskFilter(direction, 0.8f, 15f, 1f);
		textView.getPaint().setMaskFilter(filter);
	} 
 
} 
Full Snippet Info
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		myOutlinePaint.setAntiAlias(true);
		myOutlinePaint.setDither(true);
		myOutlinePaint.setStrokeWidth(4);
		myOutlinePaint.setStyle(Paint.Style.STROKE);
		myOutlinePaint.setPathEffect(new CornerPathEffect(5));
		myOutlinePaint.setMaskFilter(new EmbossMaskFilter(new float[] {1, 1, 1}, .4f, 6f, 3.5f));
	} 
 
	public final void setFont(String family, int size, boolean bold, boolean italic, boolean underline, boolean strikeThrough) {
		if ((family != null) && !myFontFamily.equals(family)) {
			myFontFamily = family;
			myResetFont = true;
		} 
		if (myFontSize != size) {
			myFontSize = size;
			myResetFont = true;
		} 
		if (myFontIsBold != bold) {
			myFontIsBold = bold;
			myResetFont = true;
Full Snippet Info
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		myOutlinePaint.setAntiAlias(true);
		myOutlinePaint.setDither(true);
		myOutlinePaint.setStrokeWidth(4);
		myOutlinePaint.setStyle(Paint.Style.STROKE);
		myOutlinePaint.setPathEffect(new CornerPathEffect(5));
		myOutlinePaint.setMaskFilter(new EmbossMaskFilter(new float[] {1, 1, 1}, .4f, 6f, 3.5f));
	} 
 
	private static ZLFile ourWallpaperFile;
	private static Bitmap ourWallpaper;
	@Override 
	public void clear(ZLFile wallpaperFile, boolean doMirror) {
		if (!wallpaperFile.equals(ourWallpaperFile)) {
			ourWallpaperFile = wallpaperFile;
			ourWallpaper = null;
			try { 
				final Bitmap fileBitmap =
					BitmapFactory.decodeStream(wallpaperFile.getInputStream());
				if (doMirror) {
					final int w = fileBitmap.getWidth();
Full Snippet Info
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            mColors = new int[] {
            	0xFFFF0000, 0xFFFF00FF, 0xFF0000FF, 0xFF00FFFF,  
            	0xFF00FF00, 0xFFFFFF00, 0xFFFF0000 
            }; 
             
            mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f);
 
            mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
             
            Shader s = new SweepGradient(0, 0, mColors, null);
            mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            mPaint.setShader(s);
            mPaint.setStyle(Paint.Style.STROKE);
            mPaint.setStrokeWidth(32);
             
            mFloatLights = new float[]{0, 0.5f, 1.0f};
            mLights = new int[]{0xFFFFFFFF, color, 0xFF000000};
            mLightPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            mLightPaint.setShader(new LinearGradient(-CENTER_X, 0, CENTER_X, 0,
								  mLights, mFloatLights, Shader.TileMode.REPEAT));
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            mColors = new int[] {
            	0xFFFF0000, 0xFFFF00FF, 0xFF0000FF, 0xFF00FFFF,  
            	0xFF00FF00, 0xFFFFFF00, 0xFFFF0000 
            }; 
             
            mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f);
 
            mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
             
            Shader s = new SweepGradient(0, 0, mColors, null);
            mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            mPaint.setShader(s);
            mPaint.setStyle(Paint.Style.STROKE);
            mPaint.setStrokeWidth(32);
             
            mFloatLights = new float[]{0, 0.5f, 1.0f};
            mLights = new int[]{0xFFFFFFFF, color, 0xFF000000};
            mLightPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            mLightPaint.setShader(new LinearGradient(-CENTER_X, 0, CENTER_X, 0,
								  mLights, mFloatLights, Shader.TileMode.REPEAT));
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		paint.setStrokeJoin(Paint.Join.ROUND);
		paint.setStrokeCap(Paint.Cap.ROUND);
		paint.setStrokeWidth(6);
 
		emboss = new EmbossMaskFilter(new float[]
		{ 1, 1, 1 }, 0.4f, 6, 3.5f); 
 
		blur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
	} 
 
	private Paint paint;
	private MaskFilter emboss;
	private MaskFilter blur;
 
	public void colorChanged(int color)
	{ 
		paint.setColor(color);
	} 
 
	public class MyView extends View
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		paint.setStrokeJoin(Paint.Join.ROUND);
		paint.setStrokeCap(Paint.Cap.ROUND);
		paint.setStrokeWidth(6);
 
		emboss = new EmbossMaskFilter(new float[]
		{ 1, 1, 1 }, 0.4f, 6, 3.5f); 
 
		blur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
	} 
 
	private Paint paint;
	private MaskFilter emboss;
	private MaskFilter blur;
 
	public void colorChanged(int color)
	{ 
		paint.setColor(color);
	} 
 
	public class MyView extends View
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		mPaint.setStyle(Paint.Style.STROKE);
		mPaint.setStrokeJoin(Paint.Join.ROUND);
		mPaint.setStrokeCap(Paint.Cap.ROUND);
		mPaint.setStrokeWidth(12);
 
		mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 0.4f, 6, 3.5f);
 
		mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
	} 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		super.onCreateOptionsMenu(menu);
 
		menu.add(0, COLOR_MENU_ID, 0, "Color").setShortcut('3', 'c');
		menu.add(0, EMBOSS_MENU_ID, 0, "Emboss").setShortcut('4', 's');
		menu.add(0, BLUR_MENU_ID, 0, "Blur").setShortcut('5', 'z');
		menu.add(0, ERASE_MENU_ID, 0, "Erase").setShortcut('5', 'z');
		menu.add(0, SRCATOP_MENU_ID, 0, "SrcATop").setShortcut('5', 'z');
 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        mPaint.setStrokeJoin(Paint.Join.ROUND);
        mPaint.setStrokeCap(Paint.Cap.ROUND);
        mPaint.setStrokeWidth(12);
 
        mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 },
                                       0.4f, 6, 3.5f); 
 
        mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
    } 
 
    private Paint       mPaint;
    private MaskFilter  mEmboss;
    private MaskFilter  mBlur;
 
    public void colorChanged(int color) {
        mPaint.setColor(color);
    } 
 
    public class MyView extends View {
 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        mPaint.setStrokeJoin(Paint.Join.ROUND);
        mPaint.setStrokeCap(Paint.Cap.ROUND);
        mPaint.setStrokeWidth(12);
 
        mEmboss = new EmbossMaskFilter(new float[] { 1, 1, 1 },
                                       0.4f, 6, 3.5f); 
 
        mBlur = new BlurMaskFilter(8, BlurMaskFilter.Blur.NORMAL);
    } 
 
    private Paint       mPaint;
    private MaskFilter  mEmboss;
    private MaskFilter  mBlur;
 
    public void colorChanged(int color) {
        mPaint.setColor(color);
    } 
 
    public class MyView extends View {
 
Full Snippet Info
4
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Android EmbossMaskFilter Questions & Answers:

See Code Examples for Android EmbossMaskFilter Methods: