public class QueenUtil
extends java.lang.Object
构造器和说明 |
---|
QueenUtil() |
限定符和类型 | 方法和说明 |
---|---|
static void |
copyAssetResource2File(android.content.Context context,
java.lang.String assetsFile,
java.lang.String outFile)
将assets文件拷贝至指定目录
|
static void |
copyFiles(android.content.Context context,
java.lang.String oldPath,
java.lang.String newPath)
已过时。
|
static void |
copyFilesFromAssets(android.content.Context context,
java.lang.String oldPath,
java.lang.String newPath)
将assets目录拷贝至指定目录
|
static int |
createTexture2D(boolean isOes)
创建OpenGL纹理
|
static void |
deleteTexture(int textureID)
释放纹理
|
static boolean |
fileExistAssets(android.content.Context context,
java.lang.String path)
assets中的文件是否存在
|
static int |
generateTextureWithBitmap(android.graphics.Bitmap bitmap)
根据Bitmap生成纹理ID
|
static int |
generateTextureWithImage(java.lang.String imagePath)
根据图片路径生成纹理ID
|
static android.graphics.Bitmap |
getBitmapByImagePath(java.lang.String imagePath)
解码图片
|
static android.graphics.Bitmap |
getBitmapFromTexture(java.lang.String filename,
int width,
int height)
把当前纹理上的数据存储到Bitmap
|
static java.lang.String[] |
getFileListFromAssets(android.content.Context context,
java.lang.String assetsPath) |
static byte[] |
rgbaValuesFromBitmap(android.graphics.Bitmap bitmap)
读取bitmap的rgba数据
|
static void |
saveTextureDataToFile(java.lang.String filePath,
int width,
int height)
把当前纹理上的数据存储到文件
|
static void |
updateTextureWithBitmap(android.graphics.Bitmap bitmap,
int textureId)
根据Bitmap更新纹理ID
|
static void |
updateTextureWithImage(java.lang.String imagePath,
int textureId)
根据图片路径更新纹理ID
|
public static void copyAssetResource2File(android.content.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(android.content.Context context, java.lang.String oldPath, java.lang.String newPath)
public static boolean fileExistAssets(android.content.Context context, java.lang.String path)
context
- path
- public static java.lang.String[] getFileListFromAssets(android.content.Context context, java.lang.String assetsPath)
public static void copyFilesFromAssets(android.content.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)
textureID
- public static android.graphics.Bitmap getBitmapByImagePath(java.lang.String imagePath)
public static int generateTextureWithImage(java.lang.String imagePath)
public static int generateTextureWithBitmap(android.graphics.Bitmap bitmap)
public static void updateTextureWithImage(java.lang.String imagePath, int textureId)
public static void updateTextureWithBitmap(android.graphics.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 android.graphics.Bitmap getBitmapFromTexture(java.lang.String filename, int width, int height)
public static byte[] rgbaValuesFromBitmap(android.graphics.Bitmap bitmap)
bitmap
-