public virtual void Render(Context ctx, Action <Context, T> draw, RenderType renderType, Color fillColor, Color penColor, double thickness) { ctx.NewPath(); draw(ctx, Shape.Data); if (renderType.HasFlag(RenderType.Fill)) { ctx.SetColor(fillColor); ctx.FillPreserve(); } if (renderType.HasFlag(RenderType.Draw)) { ctx.SetColor(penColor); ctx.SetLineWidth(thickness); ctx.Stroke(); } ctx.ClosePath(); }