MCPcopy Create free account
hub / github.com/KAlO2/PerfectShow / markSelection

Method markSelection

src/com/cloudream/ishow/algorithm/Effect.java:277–289  ·  view source on GitHub ↗
(Bitmap bitmap, Bitmap mask, int color)

Source from the content-addressed store, hash-verified

275
276 private static final DashPathEffect DASH_PATH_EFFECT = new DashPathEffect(new float[] {5, 5}, 0.0f);
277 public static Bitmap markSelection(Bitmap bitmap, Bitmap mask, int color)
278 {
279 Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
280 paint.setColor(color);
281 paint.setStyle(Style.STROKE);
282 paint.setPathEffect(DASH_PATH_EFFECT);
283
284 if(!bitmap.isMutable())
285 bitmap = bitmap.copy(bitmap.getConfig(), true);
286 Canvas canvas = new Canvas(bitmap);
287 canvas.drawBitmap(mask, 0, 0, paint);
288 return bitmap;
289 }
290
291 // native functions might as well not have the same name, or the parameter's full qualified type will join in name mangling.
292 // native_function => native_1function

Callers

nothing calls this directly

Calls 1

drawBitmapMethod · 0.80

Tested by

no test coverage detected