@@ -13,8 +13,7 @@ type SVG struct {
1313 Height int
1414}
1515
16- // See:
17- // https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme
16+ // See: https://drafts.csswg.org/mediaqueries-5/#prefers-color-scheme
1817func (s SVG ) String (svgColorLightScheme , svgColorDarkScheme string ) string {
1918 style := fmt .Sprintf (
2019 `<style type="text/css">
@@ -81,12 +80,12 @@ func writeText(out io.Writer, canvas *Canvas) {
8180` )
8281 for _ , textObj := range canvas .Text () {
8382 // usual, baseline case
84- textObj .Draw (out )
83+ textObj .draw (out )
8584 }
8685}
8786
8887// Draw a straight line as an SVG path.
89- func (l Line ) Draw (out io.Writer ) {
88+ func (l Line ) draw (out io.Writer ) {
9089 start := l .start .asPixel ()
9190 stop := l .stop .asPixel ()
9291
@@ -214,7 +213,7 @@ func (l Line) Draw(out io.Writer) {
214213}
215214
216215// Draw a solid triangle as an SVG polygon element.
217- func (t Triangle ) Draw (out io.Writer ) {
216+ func (t Triangle ) draw (out io.Writer ) {
218217 // https://www.w3.org/TR/SVG/shapes.html#PolygonElement
219218
220219 /*
@@ -320,7 +319,7 @@ func (t Triangle) Draw(out io.Writer) {
320319}
321320
322321// Draw a solid circle as an SVG circle element.
323- func (c * Circle ) Draw (out io.Writer ) {
322+ func (c * Circle ) draw (out io.Writer ) {
324323 var fill string
325324 if c .bold {
326325 fill = "currentColor"
@@ -339,7 +338,7 @@ func (c *Circle) Draw(out io.Writer) {
339338}
340339
341340// Draw a single text character as an SVG text element.
342- func (t Text ) Draw (out io.Writer ) {
341+ func (t Text ) draw (out io.Writer ) {
343342 p := t .start .asPixel ()
344343 c := t .str
345344
@@ -390,7 +389,7 @@ func (t Text) Draw(out io.Writer) {
390389}
391390
392391// Draw a rounded corner as an SVG elliptical arc element.
393- func (c * RoundedCorner ) Draw (out io.Writer ) {
392+ func (c * RoundedCorner ) draw (out io.Writer ) {
394393 // https://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands
395394
396395 x , y := c .start .asPixelXY ()
@@ -432,7 +431,7 @@ func (c *RoundedCorner) Draw(out io.Writer) {
432431}
433432
434433// Draw a bridge as an SVG elliptical arc element.
435- func (b Bridge ) Draw (out io.Writer ) {
434+ func (b Bridge ) draw (out io.Writer ) {
436435 x , y := b .start .asPixelXY ()
437436 sweepFlag := 1
438437
0 commit comments