Skip to content

Commit

Permalink
Deprecate old mergeBitmap, create new mergeBitmaps
Browse files Browse the repository at this point in the history
  • Loading branch information
fynngodau committed Jan 31, 2023
1 parent f934c1e commit 4e69447
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ protected void onSnapshotReady(@Nullable Bitmap mapContent) {
Bitmap viewContent = viewCallback.getViewContent();
if (viewContent != null) {
snapshotReadyCallback.onSnapshotReady(
BitmapUtils.mergeBitmap(mapContent, viewContent, 0f, 0f)
BitmapUtils.mergeBitmaps(mapContent, viewContent)
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,25 @@ public static Bitmap createBitmapFromView(@NonNull View view) {
* @param background The bitmap placed in the background
* @param foreground The bitmap placed in the foreground
* @return the merged bitmap
* @deprecated {@link #mergeBitmaps(Bitmap, Bitmap)} should be used instead, as it does not
* shift the input by 10px to the right and bottom.
*/
@Deprecated
public static Bitmap mergeBitmap(@NonNull Bitmap background, @NonNull Bitmap foreground) {
return mergeBitmap(background, foreground, 10f, 10f);
}

/**
* Create a bitmap from a background and a foreground bitmap.
*
* @param background The bitmap placed in the background
* @param foreground The bitmap placed in the foreground
* @return the merged bitmap
*/
public static Bitmap mergeBitmaps(@NonNull Bitmap background, @NonNull Bitmap foreground) {
return mergeBitmap(background, foreground, 0f, 0f);
}

/**
* Create a bitmap from a background and a foreground bitmap
*
Expand Down

0 comments on commit 4e69447

Please sign in to comment.