Skip to content

Commit

Permalink
face & face + id mask
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdian-s committed May 22, 2018
1 parent 574201a commit 9183095
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -500,15 +500,27 @@ protected void createWindowFrame() {
textPaint.setTextSize(spToPx(14));
switch (kycImageType) {
case SELFIE: {
// Bitmap face = BitmapFactory.decodeResource(getResources(),
// R.drawable.frame_face);
// Bitmap faceMask = BitmapFactory.decodeResource(getResources(),
// R.drawable.frame_face_mask);
// int height = face.getHeight();
// int width = face.getWidth();
// canvas.drawBitmap(faceMask, centerX - radiusx / 2, centerY - radiusy / 2,
// paint);
// canvas.drawBitmap(face, centerX - radiusx / 2, centerY - radiusy / 2, null);
Bitmap face = BitmapFactory.decodeResource(getResources(),
R.drawable.frame_face);
Bitmap faceMask = BitmapFactory.decodeResource(getResources(),
R.drawable.frame_face_mask);
int height = face.getHeight();
int width = face.getWidth();
canvas.drawText(title, centerX, centerY - (height / 2) - dpToPx(TITLE_MARGIN_BOTTOM), textPaint);
canvas.drawBitmap(faceMask, centerX - (width / 2), centerY - (height / 2), paint);
canvas.drawBitmap(face, centerX - (width / 2), centerY - (height / 2), null);
break;
}
case SELFIE_ID: {
Bitmap face = BitmapFactory.decodeResource(getResources(),
R.drawable.frame_face_id);
Bitmap faceMask = BitmapFactory.decodeResource(getResources(),
R.drawable.frame_face_id_mask);
int height = face.getHeight();
int width = face.getWidth();
canvas.drawText(title, centerX, centerY - (height / 2) - dpToPx(TITLE_MARGIN_BOTTOM), textPaint);
canvas.drawBitmap(faceMask, centerX - (width / 2), centerY - (height / 2), paint);
canvas.drawBitmap(face, centerX - (width / 2), centerY - (height / 2), null);
break;
}
case KTP: {
Expand Down
Binary file added library/src/main/res/drawable-hdpi/frame_face.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added library/src/main/res/drawable-mdpi/frame_face.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed library/src/main/res/drawable/frame_face_mask.png
Binary file not shown.

0 comments on commit 9183095

Please sign in to comment.