Created
August 18, 2022 21:17
-
-
Save khayyamsaleem/4a5f87613eb58e4c557343b129097e3d to your computer and use it in GitHub Desktop.
creating a grid with svgo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/ajstarks/svgo" | |
"os" | |
) | |
func main() { | |
width := 500 | |
height := 500 | |
canvas := svg.New(os.Stdout) | |
canvas.Start(width, height) | |
canvas.Circle(width/2, height/2, 100) | |
canvas.Text(width/2, height/2, "Hello, SVG", "text-anchor:middle;font-size:30px;fill:white") | |
canvas.Grid(0, 0, width, height, 16, "stroke:gray; opacity:1") | |
canvas.End() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the key was stroke and opacity, i suppose