Tabnine Logo
ShadowCanvas.appendDescription
Code IndexAdd Tabnine to your IDE (free)

How to use
appendDescription
method
in
org.robolectric.shadows.ShadowCanvas

Best Java code snippets using org.robolectric.shadows.ShadowCanvas.appendDescription (Showing top 20 results out of 315)

origin: robolectric/robolectric

private void separateLines() {
 if (getDescription().length() != 0) {
  appendDescription("\n");
 }
}
origin: robolectric/robolectric

@Implementation
protected void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) {
 describeBitmap(bitmap, paint);
 int x = (int) (left + translateX);
 int y = (int) (top + translateY);
 if (x != 0 || y != 0) {
  appendDescription(" at (" + x + "," + y + ")");
}
 if (scaleX != 1 && scaleY != 1) {
  appendDescription(" scaled by (" + scaleX + "," + scaleY + ")");
 }
}
origin: robolectric/robolectric

@Implementation
protected void drawColor(int color) {
 appendDescription("draw color " + color);
}
origin: robolectric/robolectric

@Implementation
protected void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) {
 describeBitmap(bitmap, paint);
 StringBuilder descriptionBuilder = new StringBuilder();
 if (dst != null) {
  descriptionBuilder.append(" at (").append(dst.left).append(",").append(dst.top)
    .append(") with height=").append(dst.height()).append(" and width=").append(dst.width());
 }
 if (src != null) {
  descriptionBuilder.append( " taken from ").append(src.toString());
 }
 appendDescription(descriptionBuilder.toString());
}
origin: robolectric/robolectric

@Implementation
protected void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint) {
 describeBitmap(bitmap, paint);
 StringBuilder descriptionBuilder = new StringBuilder();
 if (dst != null) {
  descriptionBuilder.append(" at (").append(dst.left).append(",").append(dst.top)
    .append(") with height=").append(dst.height()).append(" and width=").append(dst.width());
 }
 if (src != null) {
  descriptionBuilder.append( " taken from ").append(src.toString());
 }
 appendDescription(descriptionBuilder.toString());
}
origin: robolectric/robolectric

@Implementation
protected void draw(android.graphics.Canvas canvas) {
 Drawable background = realView.getBackground();
 if (background != null) {
  ShadowCanvas shadowCanvas = Shadow.extract(canvas);
  shadowCanvas.appendDescription("background:");
  background.draw(canvas);
 }
}
origin: robolectric/robolectric

@Implementation
protected void drawPath(Path path, Paint paint) {
 pathPaintEvents.add(new PathPaintHistoryEvent(new Path(path), new Paint(paint)));
 separateLines();
 ShadowPath shadowPath = Shadow.extract(path);
 appendDescription("Path " + shadowPath.getPoints().toString());
}
origin: robolectric/robolectric

private void describeBitmap(Bitmap bitmap, Paint paint) {
 separateLines();
 ShadowBitmap shadowBitmap = Shadow.extract(bitmap);
 appendDescription(shadowBitmap.getDescription());
 if (paint != null) {
  ColorFilter colorFilter = paint.getColorFilter();
  if (colorFilter != null) {
   if (colorFilter instanceof ColorMatrixColorFilter) {
    ColorMatrixColorFilter colorMatrixColorFilter = (ColorMatrixColorFilter) colorFilter;
    ShadowColorMatrixColorFilter shadowColorMatrixColorFilter =
      Shadow.extract(colorMatrixColorFilter);
    ColorMatrix colorMatrix = shadowColorMatrixColorFilter.getMatrix();
    appendDescription(" with ColorMatrixColorFilter<" + formatColorMatric(colorMatrix) + ">");
   } else {
    appendDescription(" with " + colorFilter);
   }
  }
 }
}
origin: robolectric/robolectric

@Implementation
protected void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) {
 describeBitmap(bitmap, paint);
 ShadowMatrix shadowMatrix = Shadow.extract(matrix);
 appendDescription(" transformed by " + shadowMatrix.getDescription());
}
origin: org.robolectric/framework

@Implementation
public void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) {
 describeBitmap(bitmap, paint);
 int x = (int) (left + translateX);
 int y = (int) (top + translateY);
 if (x != 0 || y != 0) {
  appendDescription(" at (" + x + "," + y + ")");
}
 if (scaleX != 1 && scaleY != 1) {
  appendDescription(" scaled by (" + scaleX + "," + scaleY + ")");
 }
}
origin: org.robolectric/shadows-core

@Implementation
public void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) {
 describeBitmap(bitmap, paint);
 int x = (int) (left + translateX);
 int y = (int) (top + translateY);
 if (x != 0 || y != 0) {
  appendDescription(" at (" + x + "," + y + ")");
}
 if (scaleX != 1 && scaleY != 1) {
  appendDescription(" scaled by (" + scaleX + "," + scaleY + ")");
 }
}
origin: org.robolectric/shadows-framework

@Implementation
protected void drawBitmap(Bitmap bitmap, float left, float top, Paint paint) {
 describeBitmap(bitmap, paint);
 int x = (int) (left + translateX);
 int y = (int) (top + translateY);
 if (x != 0 || y != 0) {
  appendDescription(" at (" + x + "," + y + ")");
}
 if (scaleX != 1 && scaleY != 1) {
  appendDescription(" scaled by (" + scaleX + "," + scaleY + ")");
 }
}
origin: org.robolectric/shadows-core

private void separateLines() {
 if (getDescription().length() != 0) {
  appendDescription("\n");
 }
}
origin: org.robolectric/shadows-core

@Implementation
public void drawBitmap(Bitmap bitmap, Rect src, Rect dst, Paint paint) {
 describeBitmap(bitmap, paint);
 StringBuilder descriptionBuilder = new StringBuilder();
 if (dst != null) {
  descriptionBuilder.append(" at (").append(dst.left).append(",").append(dst.top)
    .append(") with height=").append(dst.height()).append(" and width=").append(dst.width());
 }
 if (src != null) {
  descriptionBuilder.append( " taken from ").append(src.toString());
 }
 appendDescription(descriptionBuilder.toString());
}
origin: org.robolectric/framework

@Implementation
public void drawBitmap(Bitmap bitmap, Rect src, RectF dst, Paint paint) {
 describeBitmap(bitmap, paint);
 StringBuilder descriptionBuilder = new StringBuilder();
 if (dst != null) {
  descriptionBuilder.append(" at (").append(dst.left).append(",").append(dst.top)
    .append(") with height=").append(dst.height()).append(" and width=").append(dst.width());
 }
 if (src != null) {
  descriptionBuilder.append( " taken from ").append(src.toString());
 }
 appendDescription(descriptionBuilder.toString());
}
origin: org.robolectric/framework

@Implementation
public void draw(android.graphics.Canvas canvas) {
 Drawable background = realView.getBackground();
 if (background != null) {
  shadowOf(canvas).appendDescription("background:");
  background.draw(canvas);
 }
}
origin: org.robolectric/shadows-core

@Implementation
public void drawPath(Path path, Paint paint) {
 pathPaintEvents.add(new PathPaintHistoryEvent(new Path(path), new Paint(paint)));
 separateLines();
 appendDescription("Path " + shadowOf(path).getPoints().toString());
}
origin: org.robolectric/shadows-framework

@Implementation
protected void drawPath(Path path, Paint paint) {
 pathPaintEvents.add(new PathPaintHistoryEvent(new Path(path), new Paint(paint)));
 separateLines();
 ShadowPath shadowPath = Shadow.extract(path);
 appendDescription("Path " + shadowPath.getPoints().toString());
}
origin: org.robolectric/shadows-framework

@Implementation
protected void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) {
 describeBitmap(bitmap, paint);
 ShadowMatrix shadowMatrix = Shadow.extract(matrix);
 appendDescription(" transformed by " + shadowMatrix.getDescription());
}
origin: org.robolectric/shadows-core

@Implementation
public void drawBitmap(Bitmap bitmap, Matrix matrix, Paint paint) {
 describeBitmap(bitmap, paint);
 appendDescription(" transformed by " + shadowOf(matrix).getDescription());
}
org.robolectric.shadowsShadowCanvasappendDescription

Popular methods of ShadowCanvas

  • getDescription
  • getPathPaintHistoryCount
  • describeBitmap
  • separateLines
  • formatColorMatric
  • getArcPaintHistoryCount
  • getDrawnArc
  • getDrawnCircle
  • getDrawnLine
  • getDrawnOval
  • getDrawnPath
  • getDrawnPathPaint
  • getDrawnPath,
  • getDrawnPathPaint,
  • getDrawnRect,
  • getDrawnTextEvent,
  • getLinePaintHistoryCount,
  • getOvalPaintHistoryCount,
  • getRectPaintHistoryCount,
  • getTextHistoryCount,
  • resetCanvasHistory

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now