public static Drawable? CreateDrawable(this RadialGradientPaint radialGradientPaint, Context? context) { if (!radialGradientPaint.IsValid()) return null; var drawable = new MauiDrawable(context); drawable.SetBackground(radialGradientPaint); return drawable; }
public static MauiDrawable?CreateDrawable(this RadialGradientPaint radialGradientPaint) { if (!radialGradientPaint.IsValid()) { return(null); } return(new MauiDrawable { Background = radialGradientPaint }); }
public static Drawable?CreateDrawable(this RadialGradientPaint radialGradientPaint) { if (!radialGradientPaint.IsValid()) { return(null); } var drawable = new MauiDrawable(); drawable.SetPaint(radialGradientPaint); return(drawable); }