当前位置: 首页>>代码示例>>Java>>正文


Java VectorDrawable.draw方法代码示例

本文整理汇总了Java中android.graphics.drawable.VectorDrawable.draw方法的典型用法代码示例。如果您正苦于以下问题:Java VectorDrawable.draw方法的具体用法?Java VectorDrawable.draw怎么用?Java VectorDrawable.draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.graphics.drawable.VectorDrawable的用法示例。


在下文中一共展示了VectorDrawable.draw方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getBitmap

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
static private Bitmap getBitmap(VectorDrawable vectorDrawable) {
    Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
            vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;
}
 
开发者ID:m2049r,项目名称:xmrwallet,代码行数:9,代码来源:Helper.java

示例2: getBitmapFromResource

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
private static Bitmap getBitmapFromResource(VectorDrawable vectorDrawable) {
    Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
            vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;
}
 
开发者ID:ThirtyDegreesRay,项目名称:OpenHub,代码行数:9,代码来源:ViewUtils.java

示例3: getBitmap

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static Bitmap getBitmap(VectorDrawable vectorDrawable, int width, int height) {
    Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;
}
 
开发者ID:mangoblogger,项目名称:MangoBloggerAndroidApp,代码行数:9,代码来源:Utils.java

示例4: getBitmap

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static Bitmap getBitmap(VectorDrawable vectorDrawable) {
    Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
            vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;
}
 
开发者ID:NickAndroid,项目名称:Accessories_Android,代码行数:10,代码来源:ResourceAccessories.java

示例5: getBitmap

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private Bitmap getBitmap(VectorDrawable vectorDrawable) {
    Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;
}
 
开发者ID:miguelbcr,项目名称:RxGpsService,代码行数:9,代码来源:BitmapHelper.java

示例6: createBitmap

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static Bitmap createBitmap(VectorDrawable vectorDrawable) {
    Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
            vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;
}
 
开发者ID:sakebook,项目名称:CustomTabsSample,代码行数:10,代码来源:ResourceUtil.java

示例7: getBitmap

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public static Bitmap getBitmap(VectorDrawable vectorDrawable) {
    Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
            vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;

}
 
开发者ID:pattyjogal,项目名称:MusicScratchpad,代码行数:11,代码来源:NoteBitmap.java

示例8: getBitmap

import android.graphics.drawable.VectorDrawable; //导入方法依赖的package包/类
/****
 * http://stackoverflow.com/questions/33325728/android-google-maps-marker-released-unknown-imagedata-reference
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static Bitmap getBitmap(VectorDrawable vectorDrawable) {
    Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
            vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
    Canvas canvas = new Canvas(bitmap);
    vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
    vectorDrawable.draw(canvas);
    return bitmap;
}
 
开发者ID:ccjeng,项目名称:TPTrashCan,代码行数:13,代码来源:MapUtils.java


注:本文中的android.graphics.drawable.VectorDrawable.draw方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。