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


Java RectF.union方法代码示例

本文整理汇总了Java中android.graphics.RectF.union方法的典型用法代码示例。如果您正苦于以下问题:Java RectF.union方法的具体用法?Java RectF.union怎么用?Java RectF.union使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.graphics.RectF的用法示例。


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

示例1: invalidateAfterUpdate

import android.graphics.RectF; //导入方法依赖的package包/类
private void invalidateAfterUpdate() {
    View view = mView.get();
    if (view == null) {
        return;
    }
    View parent = (View)view.getParent();
    if (parent == null) {
        return;
    }

    view.setAnimation(this);

    final RectF after = mAfter;
    computeRect(after, view);
    after.union(mBefore);

    parent.invalidate(
            (int) Math.floor(after.left),
            (int) Math.floor(after.top),
            (int) Math.ceil(after.right),
            (int) Math.ceil(after.bottom));
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:23,代码来源:AnimatorProxy.java

示例2: invalidateAfterUpdate

import android.graphics.RectF; //导入方法依赖的package包/类
private void invalidateAfterUpdate() {
    View view = mView.get();
    if (view == null || view.getParent() == null) {
        return;
    }

    final RectF after = mAfter;
    computeRect(after, view);
    after.union(mBefore);

    ((View)view.getParent()).invalidate(
            (int) Math.floor(after.left),
            (int) Math.floor(after.top),
            (int) Math.ceil(after.right),
            (int) Math.ceil(after.bottom));
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:17,代码来源:AnimatorProxy.java

示例3: invalidateAfterUpdate

import android.graphics.RectF; //导入方法依赖的package包/类
private void invalidateAfterUpdate() {
    View view = mView.get();
    if (view == null || view.getParent() == null) {
        return;
    }

    final RectF after = mAfter;
    computeRect(after, view);
    after.union(mBefore);

    ((View) view.getParent()).invalidate(
            (int) Math.floor(after.left),
            (int) Math.floor(after.top),
            (int) Math.ceil(after.right),
            (int) Math.ceil(after.bottom));
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:17,代码来源:View10.java

示例4: getYBoundsForHighlight

import android.graphics.RectF; //导入方法依赖的package包/类
public static RectF getYBoundsForHighlight(
    Map<String, List<AyahBounds>> coordinateData, int sura, int ayah) {
  final List<AyahBounds> ayahBounds = coordinateData.get(sura + ":" + ayah);
  if (ayahBounds == null) {
    return null;
  }

  RectF ayahBoundsRect = null;
  for (AyahBounds bounds : ayahBounds) {
    if (ayahBoundsRect == null) {
      ayahBoundsRect = bounds.getBounds();
    } else {
      ayahBoundsRect.union(bounds.getBounds());
    }
  }
  return ayahBoundsRect;
}
 
开发者ID:Elias33,项目名称:Quran,代码行数:18,代码来源:ImageAyahUtils.java

示例5: drawStrokePoint

import android.graphics.RectF; //导入方法依赖的package包/类
final void drawStrokePoint(CanvasLite c, float x, float y, float r, RectF dirty) {
            switch (mShape) {
            case SHAPE_SQUARE:
                c.drawRect(x-r,y-r,x+r,y+r, mPaint);
                break;
//            case SHAPE_BITMAP_CIRCLE:
//                tmpRF.set(x-r,y-r,x+r,y+r);
//                if (mCircleBits == null || mCircleBitsFrame == null) {
//                    throw new RuntimeException("Slate.drawStrokePoint: no circle bitmap - frame=" + mCircleBitsFrame);
//                }
//                c.drawBitmap(mCircleBits, mCircleBitsFrame, tmpRF, mPaint);
//                break;
            case SHAPE_BITMAP_AIRBRUSH:
                tmpRF.set(x-r,y-r,x+r,y+r);
                if (mAirbrushBits == null || mAirbrushBitsFrame == null) {
                    throw new RuntimeException("Slate.drawStrokePoint: no airbrush bitmap - frame=" + mAirbrushBitsFrame);
                }
                c.drawBitmap(mAirbrushBits, mAirbrushBitsFrame, tmpRF, mPaint);
                break;
            case SHAPE_FOUNTAIN_PEN:
                tmpRF.set(x-r,y-r,x+r,y+r);
                if (mFountainPenBits == null || mFountainPenBitsFrame == null) {
                    throw new RuntimeException("Slate.drawStrokePoint: no fountainpen bitmap - frame=" + mFountainPenBitsFrame);
                }
                c.drawBitmap(mFountainPenBits, mFountainPenBitsFrame, tmpRF, mPaint);
                break;
            case SHAPE_CIRCLE:
            default:
                c.drawCircle(x, y, r, mPaint);
                break;
            }
            dirty.union(x-r, y-r, x+r, y+r);
        }
 
开发者ID:pooyafaroka,项目名称:PlusGram,代码行数:34,代码来源:Slate.java

示例6: invalidateAfterUpdate

import android.graphics.RectF; //导入方法依赖的package包/类
private void invalidateAfterUpdate() {
    View view = (View) this.mView.get();
    if (view != null && view.getParent() != null) {
        RectF after = this.mAfter;
        computeRect(after, view);
        after.union(this.mBefore);
        ((View) view.getParent()).invalidate((int) Math.floor((double) after.left), (int)
                Math.floor((double) after.top), (int) Math.ceil((double) after.right), (int)
                Math.ceil((double) after.bottom));
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:AnimatorProxy.java


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