public class QueenUtil
extends java.lang.Object
Constructor and Description |
---|
QueenUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
copyAssetResource2File(Context context,
java.lang.String assetsFile,
java.lang.String outFile)
Copy the assets file to the specified directory
|
static void |
copyFiles(Context context,
java.lang.String oldPath,
java.lang.String newPath)
Deprecated.
|
static void |
copyFilesFromAssets(Context context,
java.lang.String oldPath,
java.lang.String newPath)
Copy the assets directory to the specified directory
|
static int |
createTexture2D(boolean isOes)
Create OpenGL texture
|
static void |
deleteTexture(int textureID) |
static boolean |
fileExistAssets(Context context,
java.lang.String path)
Whether the file in assets exists
|
static int |
generateTextureWithBitmap(Bitmap bitmap)
Generate texture ID from Bitmap
|
static int |
generateTextureWithImage(java.lang.String imagePath) |
static Bitmap |
getBitmapByImagePath(java.lang.String imagePath) |
static Bitmap |
getBitmapFromTexture(java.lang.String filename,
int width,
int height) |
static java.lang.String[] |
getFileListFromAssets(Context context,
java.lang.String assetsPath) |
static byte[] |
rgbaValuesFromBitmap(Bitmap bitmap)
Read bitmap rgba data
|
static void |
saveTextureDataToFile(java.lang.String filePath,
int width,
int height)
Store the data on the current texture to a file
|
static void |
updateTextureWithBitmap(Bitmap bitmap,
int textureId) |
static void |
updateTextureWithImage(java.lang.String imagePath,
int textureId)
Update texture ID based on image path
|
public static void copyAssetResource2File(Context context, java.lang.String assetsFile, java.lang.String outFile) throws java.io.IOException
context
- assetsFile
- outFile
- java.io.IOException
@Deprecated public static void copyFiles(Context context, java.lang.String oldPath, java.lang.String newPath)
public static boolean fileExistAssets(Context context, java.lang.String path)
context
- path
- public static java.lang.String[] getFileListFromAssets(Context context, java.lang.String assetsPath)
public static void copyFilesFromAssets(Context context, java.lang.String oldPath, java.lang.String newPath)
context
- oldPath
- newPath
- public static int createTexture2D(boolean isOes)
isOes
- 是否外部纹理public static void deleteTexture(int textureID)
public static Bitmap getBitmapByImagePath(java.lang.String imagePath)
public static int generateTextureWithImage(java.lang.String imagePath)
public static int generateTextureWithBitmap(Bitmap bitmap)
public static void updateTextureWithImage(java.lang.String imagePath, int textureId)
public static void updateTextureWithBitmap(Bitmap bitmap, int textureId)
public static void saveTextureDataToFile(java.lang.String filePath, int width, int height) throws java.io.IOException
java.io.IOException
public static Bitmap getBitmapFromTexture(java.lang.String filename, int width, int height)
public static byte[] rgbaValuesFromBitmap(Bitmap bitmap)
bitmap
-