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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE
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
Stop searching for code, let great code find you!  Add Codota to your java IDE

Related Android EmbossMaskFilter Questions & Answers:

See Code Examples for Android EmbossMaskFilter Methods: