protected override string Render(Rectangle rectangle) { var r = rectangle.Rectangle; if (rectangle.Fill && rectangle.Stroke) { return($@"<rect x=""{r.X}"" y=""{r.Y}"" width=""{r.Width}"" height=""{r.Height}"" style=""fill:{ColorToHtml(FillColor)};stroke:{ColorToHtml(StrokeColor)};stroke-width:{StrokeWidth};"" />"); } if (rectangle.Fill) { return($@"<rect x=""{r.X}"" y=""{r.Y}"" width=""{r.Width}"" height=""{r.Height}"" style=""fill:{ColorToHtml(FillColor)};"" />"); } if (rectangle.Stroke) { return($@"<rect x=""{r.X}"" y=""{r.Y}"" width=""{r.Width}"" height=""{r.Height}"" style=""stroke:{ColorToHtml(StrokeColor)};stroke-width:{StrokeWidth};"" />"); } return(""); }
protected abstract string Render(Rectangle rectangle);