public class RectangleMask : IMask
{
public void DrawShape(GradientView view, RenderContext context)
{
context.Canvas.DrawRect(context.RenderRect, context.Paint);
}
}
public class TextMask : IMask
{
public string Text { get; set; }
public void DrawShape(GradientView view, RenderContext context)
{
context.Canvas.DrawText(Text, ..., context.Paint);
}
}
public class EllipseMask : IMask
{
public void DrawShape(GradientView view, RenderContext context)
{
context.Canvas.DrawOval(....);
}
}
API
With markup extension
Sample implementations
Add multiple masks