当前位置: 首页>>代码示例>>Java>>正文


Java EmbossMaskFilter类代码示例

本文整理汇总了Java中android.graphics.EmbossMaskFilter的典型用法代码示例。如果您正苦于以下问题:Java EmbossMaskFilter类的具体用法?Java EmbossMaskFilter怎么用?Java EmbossMaskFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EmbossMaskFilter类属于android.graphics包,在下文中一共展示了EmbossMaskFilter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setPaintMaskFilter

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
public void setPaintMaskFilter(int mode) {
    switch (mode) {
        case UsoppBubble.MODE_NONE:
            break;
        case UsoppBubble.MODE_GLOW:
            mDataBean.mFilter = new BlurMaskFilter(10, BlurMaskFilter.Blur.OUTER);
            break;
        case UsoppBubble.MODE_EMBOSS:
            float[] direction = new float[]{10, 10, 10};
            float ambient = 0.5f;
            float specular = 1;
            float blurRadius = 1;
            mDataBean.mFilter = new EmbossMaskFilter(direction, ambient, specular, blurRadius);
            break;
    }
    mDataBean.mPaint.setMaskFilter(mDataBean.mFilter);
}
 
开发者ID:halohoop,项目名称:UsoppBubble,代码行数:18,代码来源:UsoppFrameLayout.java

示例2: AbHorizontalProgressBar

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
/**
 * Instantiates a new ab horizontal progress bar.
 *
 * @param context the context
 * @param attrs the attrs
 */
public AbHorizontalProgressBar(Context context, AttributeSet attrs) {
	super(context, attrs);
	pathPaint  = new Paint();
	// 设置是否抗锯齿
	pathPaint.setAntiAlias(true);
	// 帮助消除锯齿
	pathPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
	// 设置中空的样式
	pathPaint.setStyle(Paint.Style.FILL);
	pathPaint.setDither(true);
	//pathPaint.setStrokeJoin(Paint.Join.ROUND);
	
	fillPaint = new Paint();
	// 设置是否抗锯齿
	fillPaint.setAntiAlias(true);
	// 帮助消除锯齿
	fillPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
	// 设置中空的样式
	fillPaint.setStyle(Paint.Style.FILL);
	fillPaint.setDither(true);
	//fillPaint.setStrokeJoin(Paint.Join.ROUND);
	
	emboss = new EmbossMaskFilter(direction,light,specular,blur);  
	mBlur = new BlurMaskFilter(20, BlurMaskFilter.Blur.NORMAL);
}
 
开发者ID:bangqu,项目名称:eshow-android,代码行数:32,代码来源:AbHorizontalProgressBar.java

示例3: ZLAndroidPaintContext

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
ZLAndroidPaintContext(Canvas canvas, int width, int height, int scrollbarWidth) {
	myCanvas = canvas;
	myWidth = width - scrollbarWidth;
	myHeight = height;
	myScrollbarWidth = scrollbarWidth;

	myTextPaint.setLinearText(false);
	myTextPaint.setAntiAlias(AntiAliasOption.getValue());
	if (DeviceKerningOption.getValue()) {
		myTextPaint.setFlags(myTextPaint.getFlags() | Paint.DEV_KERN_TEXT_FLAG);
	} else {
		myTextPaint.setFlags(myTextPaint.getFlags() & ~Paint.DEV_KERN_TEXT_FLAG);
	}
	myTextPaint.setDither(DitheringOption.getValue());
	myTextPaint.setSubpixelText(SubpixelOption.getValue());

	myLinePaint.setStyle(Paint.Style.STROKE);

	myOutlinePaint.setColor(Color.rgb(255, 127, 0));
	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));
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:27,代码来源:ZLAndroidPaintContext.java

示例4: emboss

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
/**
 * @see EmbossMaskFilter#EmbossMaskFilter(float[], float, float, float)
 */
public static Span emboss(@NonNull final float[] direction, final float ambient, final float specular, final float blurRadius) {
    return new Span(new SpanBuilder() {
        @Override
        public Object build() {
            return new MaskFilterSpan(new EmbossMaskFilter(direction, ambient, specular, blurRadius));
        }
    });
}
 
开发者ID:neworld,项目名称:spanner,代码行数:12,代码来源:Spans.java

示例5: emboss

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
public TextDecorator emboss(final float[] direction, final float ambient, final float specular, final float blurRadius, final int start, final int end) {
  checkIndexOutOfBoundsException(start, end);
  decoratedContent.setSpan(new MaskFilterSpan(new EmbossMaskFilter(direction, ambient, specular, blurRadius)), start, end,
      flags);

  return this;
}
 
开发者ID:nntuyen,项目名称:text-decorator,代码行数:8,代码来源:TextDecorator.java

示例6: updateEmboss

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
private void updateEmboss() {
    if (isInEditMode())
        return;
    if (!withEffects3D) {
        tubePaint.setMaskFilter(null);
        tubeBacPaint.setMaskFilter(null);
        return;
    }
    EmbossMaskFilter embossMaskFilter = new EmbossMaskFilter(
            new float[] { .5f, 1f, 1f }, .6f, 3f, pxTOdp(getSpeedometerWidth())*.35f);
    tubePaint.setMaskFilter(embossMaskFilter);
    EmbossMaskFilter embossMaskFilterBac = new EmbossMaskFilter(
            new float[] { -.5f, -1f, 0f }, .6f, 1f, pxTOdp(getSpeedometerWidth())*.35f);
    tubeBacPaint.setMaskFilter(embossMaskFilterBac);
}
 
开发者ID:anastr,项目名称:SpeedView,代码行数:16,代码来源:TubeSpeedometer.java

示例7: AbCircleProgressBar

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
/**
 * Instantiates a new ab circle progress bar.
 *
 * @param context the context
 * @param attrs the attrs
 */
public AbCircleProgressBar(Context context, AttributeSet attrs) {
	super(context, attrs);
	pathPaint  = new Paint();
	// 设置是否抗锯齿
	pathPaint.setAntiAlias(true);
	// 帮助消除锯齿
	pathPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
	// 设置中空的样式
	pathPaint.setStyle(Paint.Style.STROKE);
	pathPaint.setDither(true);
	pathPaint.setStrokeJoin(Paint.Join.ROUND);
	
	fillArcPaint = new Paint();
	// 设置是否抗锯齿
	fillArcPaint.setAntiAlias(true);
	// 帮助消除锯齿
	fillArcPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
	// 设置中空的样式
	fillArcPaint.setStyle(Paint.Style.STROKE);
	fillArcPaint.setDither(true);
	fillArcPaint.setStrokeJoin(Paint.Join.ROUND);
			
	oval = new RectF();
	emboss = new EmbossMaskFilter(direction,light,specular,blur);  
	mBlur = new BlurMaskFilter(20, BlurMaskFilter.Blur.NORMAL);
}
 
开发者ID:bangqu,项目名称:eshow-android,代码行数:33,代码来源:AbCircleProgressBar.java

示例8: preparePainters

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
private void preparePainters() {

        borderPencil = new Paint(Paint.ANTI_ALIAS_FLAG);

        borderPencil.setStrokeWidth(0.5f);
        borderPencil.setColor(0xFF6d6968);
        borderPencil.setStyle(Paint.Style.STROKE);

        itemDefaultColor = new Paint(Paint.ANTI_ALIAS_FLAG);
        itemDefaultColor.setStyle(Paint.Style.FILL);
        itemDefaultColor.setColor(0xfff3f3f3);

        itemTouchedBack = new Paint(Paint.ANTI_ALIAS_FLAG);
        itemTouchedBack.setColor(0xffFFFFFF);
        itemTouchedBack.setStyle(Paint.Style.FILL);

        rainbowBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
        rainbowBorderPaint.setStyle(Paint.Style.STROKE);
        rainbowBorderPaint.setStrokeWidth(CircleMenuSettings.rainbowCircleBorderWidth);

        smallBorderPencil = new Paint(Paint.ANTI_ALIAS_FLAG);
        smallBorderPencil.setColor(0xFFE6E6E6);
        smallBorderPencil.setStyle(Paint.Style.FILL);

        forBig = new EmbossMaskFilter(new float[] { 1, 1, 1 }, 1f, 4, 2.5f);
        itemDefaultColor.setMaskFilter(forBig);
    }
 
开发者ID:mpolanec,项目名称:Android-circular-menu-example,代码行数:28,代码来源:CircleMenu.java

示例9: init

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
/**
 * 그래프 초기화
 */
public void init(){
	super.setWillNotDraw(false);
	
	isSizeToScale = true;
	strokSize = -1;
	
	isBackArc = false;
	Arc backArc;
	arcMargin=0;
	
	startAngle=0;
	maxAngle=360;
	
	isCapRound = false;
	emboss =  new EmbossMaskFilter(new float[]{-1,-1,1},0.7f,3,4);
	
	isInitpieSkin = false;
	
	density = getContext().getResources().getDisplayMetrics().density;
	strokScale = 1.0f;
	
	if(arcs.size()>0 || pieSkin.size()>0){
		pieSkin.clear();
		arcs.clear();
		this.invalidate();
	}
}
 
开发者ID:muabe,项目名称:JwTools,代码行数:31,代码来源:PieLayout.java

示例10: embossPen

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
private void embossPen()
{
	MaskFilter mEmboss = new EmbossMaskFilter(new float[]{ 1, 1, 1 }, 0.4f, 6, 3.5f);
	mPenPaint.setDither(true);
	mPenPaint.setAntiAlias(true);
	mPenPaint.setStyle(Paint.Style.STROKE);
	mPenPaint.setStrokeJoin(Paint.Join.ROUND);
	mPenPaint.setStrokeCap(Paint.Cap.ROUND);
	mPenPaint.setMaskFilter(mEmboss);
}
 
开发者ID:Rowandjj,项目名称:yitu,代码行数:11,代码来源:PaintStyle.java

示例11: applyFilter

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
private void applyFilter(
    TextView textView, float[] direction, float ambient, float specular, float blurRadius) {
  if (Build.VERSION.SDK_INT >= 11) {
    ViewUtil.setSoftwareLayerType(textView);
  }
  EmbossMaskFilter filter = new EmbossMaskFilter(direction, ambient, specular, blurRadius);
  textView.getPaint().setMaskFilter(filter);
}
 
开发者ID:chiuki,项目名称:android-graphics-demo,代码行数:9,代码来源:EmbossMaskFilterActivity.java

示例12: setMaskFilter

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
public Arc setMaskFilter(EmbossMaskFilter emboss){
	this.emboss = emboss;
	init();
	return this;
}
 
开发者ID:muabe,项目名称:JwTools,代码行数:6,代码来源:Arc.java

示例13: getMaskFilter

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
public EmbossMaskFilter getMaskFilter(){
	return emboss;
}
 
开发者ID:muabe,项目名称:JwTools,代码行数:4,代码来源:Arc.java

示例14: setMaskFilter

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
public void setMaskFilter(EmbossMaskFilter emboss){
	for(int i=0;i<arcs.size();i++){
		Arc arc = arcs.get(i);
		arc.setMaskFilter(emboss);
	}
}
 
开发者ID:muabe,项目名称:JwTools,代码行数:7,代码来源:PieLayout.java

示例15: setEmboss

import android.graphics.EmbossMaskFilter; //导入依赖的package包/类
public void setEmboss(EmbossMaskFilter emboss){
	this.emboss = emboss;
	
}
 
开发者ID:muabe,项目名称:JwTools,代码行数:5,代码来源:PieLayout.java


注:本文中的android.graphics.EmbossMaskFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。