~eliasnaur/giologo

The Gio logo in SVG and IconVG
add play.golang.org link
initial import

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~eliasnaur/giologo
read/write
git@git.sr.ht:~eliasnaur/giologo

You can also use your local clone with git send-email.

Egon Elbre's logo for Gio in SVG and IconVG format.

#Use

import "eliasnaur.com/giologo"
import "golang.org/x/exp/shiny/iconvg"

sz := 100 // pixels
logo := giologo.Gio
m, _ := iconvg.DecodeMetadata(logo)
dx, dy := m.ViewBox.AspectRatio()
img := image.NewRGBA(image.Rectangle{Max: image.Point{X: sz, Y: int(float32(sz) * dy / dx)}})
var ico iconvg.Rasterizer
ico.SetDstImage(img, img.Bounds(), draw.Src)
// Use white for icons.
m.Palette[0] = color.RGBA{A: 0xff, R: 0xff, G: 0xff, B: 0xff}
iconvg.Decode(&ico, logo, &iconvg.DecodeOptions{
	Palette: &m.Palette,
})

See the result here.