當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。