Home | History | Annotate | Download | only in stream

Lines Matching refs:vectorDrawable

21 import android.graphics.drawable.VectorDrawable;
31 * Returns a {@link Bitmap} from a {@link VectorDrawable}.
33 * retrieve a bitmap from a VectorDrawable, so this method works around that.
36 public static Bitmap getBitmap(VectorDrawable vectorDrawable) {
37 if (vectorDrawable == null) {
41 Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(),
42 vectorDrawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
44 vectorDrawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
45 vectorDrawable.draw(canvas);