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


Java MaskFilter类代码示例

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


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

示例1: RichPolygon

import android.graphics.MaskFilter; //导入依赖的package包/类
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);
    }
}
 
开发者ID:antoniocarlon,项目名称:richmaps,代码行数:26,代码来源:RichPolygon.java

示例2: hasMaskFilter

import android.graphics.MaskFilter; //导入依赖的package包/类
public S hasMaskFilter(MaskFilter filter) {
  assertThat(actual().getMaskFilter())
      .named("mask filter")
      .isSameAs(filter);
  //noinspection unchecked
  return (S) this;
}
 
开发者ID:pkware,项目名称:truth-android,代码行数:8,代码来源:AbstractPaintSubject.java

示例3: RichShape

import android.graphics.MaskFilter; //导入依赖的package包/类
RichShape(final int zIndex,
          final List<RichPoint> points,
          final int strokeWidth,
          final Paint.Cap strokeCap,
          final Paint.Join strokeJoin,
          final PathEffect pathEffect,
          final MaskFilter maskFilter,
          final Shader strokeShader,
          final boolean linearGradient,
          final Integer strokeColor,
          final boolean antialias,
          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);
        }
    }
}
 
开发者ID:antoniocarlon,项目名称:richmaps,代码行数:30,代码来源:RichShape.java

示例4: RichPolyline

import android.graphics.MaskFilter; //导入依赖的package包/类
RichPolyline(final int zIndex,
             final List<RichPoint> points,
             final int strokeWidth,
             final Paint.Cap strokeCap,
             final Paint.Join strokeJoin,
             final PathEffect pathEffect,
             final MaskFilter maskFilter,
             final Shader strokeShader,
             final boolean linearGradient,
             final Integer strokeColor,
             final boolean antialias,
             final boolean closed) {
    super(zIndex, points, strokeWidth, strokeCap, strokeJoin, pathEffect, maskFilter,
            strokeShader, linearGradient, strokeColor, antialias, closed);
}
 
开发者ID:antoniocarlon,项目名称:richmaps,代码行数:16,代码来源:RichPolyline.java

示例5: embossPen

import android.graphics.MaskFilter; //导入依赖的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

示例6: blurPen

import android.graphics.MaskFilter; //导入依赖的package包/类
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);
}
 
开发者ID:Rowandjj,项目名称:yitu,代码行数:11,代码来源:PaintStyle.java

示例7: HolographicOutlineHelper

import android.graphics.MaskFilter; //导入依赖的package包/类
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);
}
 
开发者ID:pengqinping,项目名称:androidProject,代码行数:12,代码来源:HolographicOutlineHelper.java

示例8: hasMaskFilter

import android.graphics.MaskFilter; //导入依赖的package包/类
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;
}
 
开发者ID:square,项目名称:assertj-android,代码行数:9,代码来源:AbstractPaintAssert.java

示例9: mask

import android.graphics.MaskFilter; //导入依赖的package包/类
public static Node mask(MaskFilter filter, Object... nodes) {
    return new SpanNode(new MaskFilterSpan(filter), nodes);
}
 
开发者ID:SimonMarquis,项目名称:Android-Spans,代码行数:4,代码来源:Span.java

示例10: MaskFilterSpan

import android.graphics.MaskFilter; //导入依赖的package包/类
public MaskFilterSpan(MaskFilter filter) {
	mFilter = filter;
}
 
开发者ID:jiro-aqua,项目名称:JotaTextEditor,代码行数:4,代码来源:MaskFilterSpan.java

示例11: getMaskFilter

import android.graphics.MaskFilter; //导入依赖的package包/类
public MaskFilter getMaskFilter() {
	return mFilter;
}
 
开发者ID:jiro-aqua,项目名称:JotaTextEditor,代码行数:4,代码来源:MaskFilterSpan.java

示例12: beginDraggingWidget

import android.graphics.MaskFilter; //导入依赖的package包/类
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, 0, 0, w, h, 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, b, alphaClipPaint);
    mDragController.startDrag(image, b, this, createItemInfo,
            DragController.DRAG_ACTION_COPY, null);
    b.recycle();
}
 
开发者ID:pengqinping,项目名称:androidProject,代码行数:55,代码来源:AppsCustomizePagedView.java


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