POT textures (#334)

This commit is contained in:
Longri
2017-03-16 11:43:38 +01:00
committed by Emux
parent d614809df0
commit d1fdca170e
12 changed files with 244 additions and 13 deletions

View File

@@ -2,6 +2,7 @@
* Copyright 2013 Hannes Janetzek
* Copyright 2016-2017 devemux86
* Copyright 2017 nebular
* Copyright 2017 Longri
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@@ -58,6 +59,14 @@ public class AndroidCanvas implements Canvas {
}
}
@Override
public void drawBitmap(Bitmap bitmap) {
android.graphics.Bitmap scaledBitmap = android.graphics.Bitmap.createScaledBitmap(
((AndroidBitmap) bitmap).mBitmap, canvas.getWidth(), canvas.getHeight(), true);
canvas.drawBitmap(scaledBitmap, 0, 0, null);
scaledBitmap.recycle();
}
@Override
public void drawBitmap(Bitmap bitmap, float x, float y) {
canvas.drawBitmap(((AndroidBitmap) bitmap).mBitmap, x, y, null);