I have subclassed ImageView and overloaded the OnDraw() method in order to display a circular image instead of the original square one.
Now I want to change the MvxImageView to do the same. However, when I override the OnDraw method, the Bitmap property seems to be null.
protected override void OnDraw(Android.Graphics.Canvas canvas)
{
if (Drawable == null)
return;
if (Width == 0 || Height == 0)
return;
Bitmap b = ((BitmapDrawable)Drawable).Bitmap;
Bitmap bitmap = b.Copy(Bitmap.Config.Argb8888, true);
What am I doing wrong/where to get the Bitmap?
regards,
Arthur
0 comments:
Post a Comment