public void resetCanvasHistory() { drawnTextEventHistory.clear(); pathPaintEvents.clear(); circlePaintEvents.clear(); rectPaintEvents.clear(); linePaintEvents.clear(); ovalPaintEvents.clear(); ShadowBitmap shadowBitmap = Shadow.extract(targetBitmap); shadowBitmap.setDescription(""); }
@Implementation(minSdk = JELLY_BEAN_MR1) protected static Bitmap createBitmap( DisplayMetrics displayMetrics, int width, int height, Bitmap.Config config) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be > 0"); } Bitmap scaledBitmap = ReflectionHelpers.callConstructor(Bitmap.class); ShadowBitmap shadowBitmap = Shadow.extract(scaledBitmap); shadowBitmap.setDescription("Bitmap (" + width + " x " + height + ")"); shadowBitmap.width = width; shadowBitmap.height = height; shadowBitmap.config = config; shadowBitmap.setMutable(true); if (displayMetrics != null) { shadowBitmap.density = displayMetrics.densityDpi; } shadowBitmap.setPixels(new int[shadowBitmap.getHeight() * shadowBitmap.getWidth()], 0, shadowBitmap.getWidth(), 0, 0, shadowBitmap.getWidth(), shadowBitmap.getHeight()); return scaledBitmap; }
public void resetCanvasHistory() { drawnTextEventHistory.clear(); pathPaintEvents.clear(); circlePaintEvents.clear(); rectPaintEvents.clear(); linePaintEvents.clear(); ovalPaintEvents.clear(); shadowOf(targetBitmap).setDescription(""); }
public void resetCanvasHistory() { drawnTextEventHistory.clear(); pathPaintEvents.clear(); circlePaintEvents.clear(); rectPaintEvents.clear(); linePaintEvents.clear(); ovalPaintEvents.clear(); shadowOf(targetBitmap).setDescription(""); }
public void resetCanvasHistory() { drawnTextEventHistory.clear(); pathPaintEvents.clear(); circlePaintEvents.clear(); rectPaintEvents.clear(); linePaintEvents.clear(); ovalPaintEvents.clear(); shadowOf(targetBitmap).setDescription(""); }
public void resetCanvasHistory() { drawnTextEventHistory.clear(); pathPaintEvents.clear(); circlePaintEvents.clear(); rectPaintEvents.clear(); linePaintEvents.clear(); ovalPaintEvents.clear(); ShadowBitmap shadowBitmap = Shadow.extract(targetBitmap); shadowBitmap.setDescription(""); }
@Implementation(minSdk = JELLY_BEAN_MR1) protected static Bitmap createBitmap( DisplayMetrics displayMetrics, int width, int height, Bitmap.Config config) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be > 0"); } Bitmap scaledBitmap = ReflectionHelpers.callConstructor(Bitmap.class); ShadowBitmap shadowBitmap = Shadow.extract(scaledBitmap); shadowBitmap.setDescription("Bitmap (" + width + " x " + height + ")"); shadowBitmap.width = width; shadowBitmap.height = height; shadowBitmap.config = config; shadowBitmap.setMutable(true); if (displayMetrics != null) { shadowBitmap.density = displayMetrics.densityDpi; } shadowBitmap.setPixels(new int[shadowBitmap.getHeight() * shadowBitmap.getWidth()], 0, shadowBitmap.getWidth(), 0, 0, shadowBitmap.getWidth(), shadowBitmap.getHeight()); return scaledBitmap; }
@Implementation public static Bitmap createBitmap(DisplayMetrics displayMetrics, int width, int height, Bitmap.Config config) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be > 0"); } Bitmap scaledBitmap = ReflectionHelpers.callConstructor(Bitmap.class); ShadowBitmap shadowBitmap = shadowOf(scaledBitmap); shadowBitmap.setDescription("Bitmap (" + width + " x " + height + ")"); shadowBitmap.width = width; shadowBitmap.height = height; shadowBitmap.config = config; shadowBitmap.setMutable(true); if (displayMetrics != null) { shadowBitmap.density = displayMetrics.densityDpi; } shadowBitmap.setPixels(new int[shadowBitmap.getHeight() * shadowBitmap.getWidth()], 0, shadowBitmap.getWidth(), 0, 0, shadowBitmap.getWidth(), shadowBitmap.getHeight()); return scaledBitmap; }
@Implementation public static Bitmap createBitmap(DisplayMetrics displayMetrics, int width, int height, Bitmap.Config config) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be > 0"); } Bitmap scaledBitmap = ReflectionHelpers.callConstructor(Bitmap.class); ShadowBitmap shadowBitmap = shadowOf(scaledBitmap); shadowBitmap.setDescription("Bitmap (" + width + " x " + height + ")"); shadowBitmap.width = width; shadowBitmap.height = height; shadowBitmap.config = config; shadowBitmap.setMutable(true); if (displayMetrics != null) { shadowBitmap.density = displayMetrics.densityDpi; } shadowBitmap.setPixels(new int[shadowBitmap.getHeight() * shadowBitmap.getWidth()], 0, shadowBitmap.getWidth(), 0, 0, shadowBitmap.getWidth(), shadowBitmap.getHeight()); return scaledBitmap; }
@Implementation public static Bitmap createBitmap(DisplayMetrics displayMetrics, int width, int height, Bitmap.Config config) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be > 0"); } Bitmap scaledBitmap = ReflectionHelpers.callConstructor(Bitmap.class); ShadowBitmap shadowBitmap = shadowOf(scaledBitmap); shadowBitmap.setDescription("Bitmap (" + width + " x " + height + ")"); shadowBitmap.width = width; shadowBitmap.height = height; shadowBitmap.config = config; shadowBitmap.setMutable(true); if (displayMetrics != null) { shadowBitmap.density = displayMetrics.densityDpi; } shadowBitmap.setPixels(new int[shadowBitmap.getHeight() * shadowBitmap.getWidth()], 0, shadowBitmap.getWidth(), 0, 0, shadowBitmap.getWidth(), shadowBitmap.getHeight()); return scaledBitmap; }