forked from organicmaps/organicmaps
[android] Fix comments from #4061
Signed-off-by: Andrew Shkrob <andrew.shkrob.social@yandex.by>
This commit is contained in:
parent
353677fc3e
commit
72ee0ac9ae
1 changed files with 2 additions and 4 deletions
|
@ -148,13 +148,11 @@ public final class Graphics
|
|||
{
|
||||
final BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
|
||||
if (bitmapDrawable.getBitmap() != null)
|
||||
{
|
||||
return bitmapDrawable.getBitmap();
|
||||
}
|
||||
}
|
||||
|
||||
final int drawableWidth = drawable.getIntrinsicWidth() <= 0 ? 1 : drawable.getIntrinsicWidth();
|
||||
final int drawableHeight = drawable.getIntrinsicHeight() <= 0 ? 1 : drawable.getIntrinsicHeight();
|
||||
final int drawableWidth = Math.max(drawable.getIntrinsicWidth(), 1);
|
||||
final int drawableHeight = Math.max(drawable.getIntrinsicHeight(), 1);
|
||||
final Bitmap bitmap = Bitmap.createBitmap(drawableWidth, drawableHeight, Bitmap.Config.ARGB_8888);
|
||||
final Canvas canvas = new Canvas(bitmap);
|
||||
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
|
||||
|
|
Loading…
Add table
Reference in a new issue