Esempio n. 1
0
 private void drawOnCanvas(int top) {
   this.canvas.drawColor(this.parent.getResources().getColor(C0065R.color.BackgroundGray));
   CrDb.logTime("screen capture", "capture draw on canvas ", true);
   if (this.canvas.getSaveCount() > 1) {
     this.canvas.restore();
   }
   this.canvas.save();
   if (top > 0) {
     this.canvas.translate(0.0f, (float) (-top));
   }
   this.parent.draw(this.canvas);
   CrDb.logTime("screen capture", "capture draw on canvas ", false);
 }
Esempio n. 2
0
 private void recapture(int top, int bottom) {
   if (!cannotRecapture()) {
     int width = this.parent.getWidth();
     int height = bottom - top;
     if (height <= 0) {
       height = this.parent.getHeight();
     }
     CrDb.logTime("screen capture", "recaptured ", true);
     this.bitmap = Bitmap.createBitmap(width, height, Config.ARGB_8888);
     CrDb.m0d(
         "screen capture",
         "bitmap initialize "
             + width
             + MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR
             + height);
     this.canvas = new Canvas(this.bitmap);
     CrDb.logTime("screen capture", "recaptured ", false);
   }
 }
 public void set(int paramInt1, int paramInt2) {
   try {
     setSpan(getBss(), paramInt1, paramInt2, 18);
     setSpan(getFss(), paramInt1, paramInt2, 18);
     return;
   } catch (IndexOutOfBoundsException localIndexOutOfBoundsException) {
     CrDb.d(
         "fragment link trie malfunctioning",
         localIndexOutOfBoundsException.getMessage() + " @ " + this.text);
   }
 }
 public void addComments(boolean fullScreen) {
   CrDb.logTime("imgur image", "comments", true);
   if (this.comments != null) {
     this.title.setVisibility(0);
     this.loading.setVisibility(8);
     int newHeight = getResources().getDisplayMetrics().heightPixels;
     float margin = getResources().getDimension(C0065R.dimen.imgur_comment_margin_bottom);
     if (!fullScreen) {
       newHeight = 1;
     }
     while (newHeight > 0
         && this.index < this.comments.size()
         && this.index < this.commentContainer.getChildCount()) {
       ImageCommentView view = (ImageCommentView) this.commentContainer.getChildAt(this.index);
       view.setVisibility(0);
       view.fillWith((ImageComment) this.comments.get(this.index));
       this.index++;
       newHeight -= view.getMeasuredHeight();
     }
     CrDb.logTime("imgur image", "comments", false);
   }
 }