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

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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