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

Method createMask

src/com/cloudream/ishow/algorithm/Effect.java:188–204  ·  view source on GitHub ↗
(int width, int height, final Path path, int color, int blurRadius)

Source from the content-addressed store, hash-verified

186 SettingsActivity.saveImage(this, null, bitmap);
187*/
188 public static Bitmap createMask(int width, int height, final Path path, int color, int blurRadius)
189 {
190 Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); // mutable
191 Canvas canvas = new Canvas(bitmap);
192 canvas.drawColor(Color.TRANSPARENT);
193
194 Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
195// https://github.com/chiuki/android-graphics-demo/tree/master/app/src/main/java/com/sqisland/android/graphics_demo
196// if(Build.VERSION.SDK_INT >= 11)
197// view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
198 paint.setMaskFilter(new BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.NORMAL));
199 paint.setColor(color);
200 paint.setStyle(Style.FILL);
201
202 canvas.drawPath(path, paint);
203 return bitmap;
204 }
205
206 /**
207 *

Callers 1

blendLipMethod · 0.95

Calls 1

createBitmapMethod · 0.80

Tested by

no test coverage detected