微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android.graphics.MaskFilter的实例源码

项目:richmaps    文件Richpolygon.java   
Richpolygon(final int zIndex,final List<RichPoint> points,final List<List<RichPoint>> holes,final int strokeWidth,final Paint.Cap strokeCap,final Paint.Join strokeJoin,final PathEffect pathEffect,final MaskFilter maskFilter,final boolean linearGradient,final Integer strokeColor,final boolean antialias,final boolean closed,final Shader strokeShader,final Shader fillShader,final Paint.Style style,final Integer fillColor) {
    super(zIndex,points,strokeWidth,strokeCap,strokeJoin,pathEffect,maskFilter,strokeShader,linearGradient,strokeColor,antialias,closed);
    this.fillShader = fillShader;
    this.style = style;
    this.fillColor = fillColor;
    if (holes != null) {
        addHoles(holes);
    }
}
项目:truth-android    文件AbstractPaintSubject.java   
public S hasMaskFilter(MaskFilter filter) {
  assertthat(actual().getMaskFilter())
      .named("mask filter")
      .isSameAs(filter);
  //noinspection unchecked
  return (S) this;
}
项目:richmaps    文件RichShape.java   
RichShape(final int zIndex,final boolean closed) {
    this.zIndex = zIndex;
    this.strokeWidth = strokeWidth;
    this.strokeCap = strokeCap;
    this.strokeJoin = strokeJoin;
    this.pathEffect = pathEffect;
    this.maskFilter = maskFilter;
    this.strokeShader = strokeShader;
    this.linearGradient = linearGradient;
    this.strokeColor = strokeColor;
    this.antialias = antialias;
    this.closed = closed;
    if (points != null) {
        for (RichPoint point : points) {
            add(point);
        }
    }
}
项目:richmaps    文件Richpolyline.java   
Richpolyline(final int zIndex,final boolean closed) {
    super(zIndex,closed);
}
项目:yitu    文件PaintStyle.java   
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);
}
项目:yitu    文件PaintStyle.java   
private void blurPen()
{
    MaskFilter mBlur = new BlurMaskFilter(8,BlurMaskFilter.Blur.norMAL);
    mPenPaint.setDither(true);
    mPenPaint.setAntiAlias(true);
    mPenPaint.setStyle(Paint.Style.stroke);
    mPenPaint.setstrokeJoin(Paint.Join.ROUND);
    mPenPaint.setstrokeCap(Paint.Cap.ROUND);
    mPenPaint.setMaskFilter(mBlur);
}
项目:androidProject    文件HolographicOutlineHelper.java   
HolographicOutlineHelper() {
    mHolographicPaint.setFilterBitmap(true);
    mHolographicPaint.setAntiAlias(true);
    mBlurPaint.setFilterBitmap(true);
    mBlurPaint.setAntiAlias(true);
    mErasePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
    mErasePaint.setFilterBitmap(true);
    mErasePaint.setAntiAlias(true);
    MaskFilter alphaClipTable = TableMaskFilter.CreateClipTable(180,255);
    mAlphaClipPaint.setMaskFilter(alphaClipTable);
}
项目:assertj-android    文件AbstractPaintAssert.java   
public S hasMaskFilter(MaskFilter filter) {
  isNotNull();
  MaskFilter actualFilter = actual.getMaskFilter();
  assertthat(actualFilter) //
      .overridingErrorMessage("Expected mask filter <%s> but was <%s>.",filter,actualFilter) //
      .isSameAs(filter);
  return myself;
}
项目:Android-Spans    文件Span.java   
public static Node mask(MaskFilter filter,Object... nodes) {
    return new SpanNode(new MaskFilterSpan(filter),nodes);
}
项目:JotaTextEditor    文件MaskFilterSpan.java   
public MaskFilterSpan(MaskFilter filter) {
    mFilter = filter;
}
项目:JotaTextEditor    文件MaskFilterSpan.java   
public MaskFilter getMaskFilter() {
    return mFilter;
}
项目:androidProject    文件AppsCustomizePagedView.java   
private void beginDraggingWidget(View v) {
    // Get the widget preview as the drag representation
    ImageView image = (ImageView) v.findViewById(R.id.widget_preview);
    PendingAddItemInfo createItemInfo = (PendingAddItemInfo) v.getTag();

    // Compose the drag image
    Bitmap b;
    Drawable preview = image.getDrawable();
    RectF mTmpScaleRect = new RectF(0f,0f,1f,1f);
    image.getimageMatrix().mapRect(mTmpScaleRect);
    float scale = mTmpScaleRect.right;
    int w = (int) (preview.getIntrinsicWidth() * scale);
    int h = (int) (preview.getIntrinsicHeight() * scale);
    if (createItemInfo instanceof PendingAddWidgetInfo) {
        PendingAddWidgetInfo createWidgetInfo = (PendingAddWidgetInfo) createItemInfo;
        int[] spanXY = mLauncher.getSpanForWidget(createWidgetInfo,null);
        createItemInfo.spanX = spanXY[0];
        createItemInfo.spanY = spanXY[1];

        b = Bitmap.createBitmap(w,h,Bitmap.Config.ARGB_8888);
        renderDrawabletoBitmap(preview,b,w,scale,mDragViewMultiplyColor);
    } else {
        // Workaround for the fact that we don't keep the original ResolveInfo associated with
        // the shortcut around.  To get the icon,we just render the preview image (which has
        // the shortcut icon) to a new drag bitmap that clips the non-icon space.
        b = Bitmap.createBitmap(mWidgetPreviewIconPaddedDimension,mWidgetPreviewIconPaddedDimension,Bitmap.Config.ARGB_8888);
        mCanvas.setBitmap(b);
        mCanvas.save();
        preview.draw(mCanvas);
        mCanvas.restore();
        mCanvas.drawColor(mDragViewMultiplyColor,PorterDuff.Mode.MULTIPLY);
        mCanvas.setBitmap(null);
        createItemInfo.spanX = createItemInfo.spanY = 1;
    }

    // We use a custom alpha clip table for the default widget previews
    Paint alphaClipPaint = null;
    if (createItemInfo instanceof PendingAddWidgetInfo) {
        if (((PendingAddWidgetInfo) createItemInfo).hasDefaultPreview) {
            MaskFilter alphaClipTable = TableMaskFilter.CreateClipTable(0,255);
            alphaClipPaint = new Paint();
            alphaClipPaint.setMaskFilter(alphaClipTable);
        }
    }

    // Start the drag
    mLauncher.lockScreenorientationOnLargeUI();
    mLauncher.getWorkspace().onDragStartedWithItemSpans(createItemInfo.spanX,createItemInfo.spanY,alphaClipPaint);
    mDragController.startDrag(image,this,createItemInfo,DragController.DRAG_ACTION_copY,null);
    b.recycle();
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。