Directories ¶
Path | Synopsis |
---|---|
Package openvg is a wrapper to a C library of high-level 2D graphics operations built on OpenVG 1.1 The typical "hello world" program looks like this: package main import ( "bufio" "github.com/ajstarks/openvg" "os" ) func main() { width, height := openvg.Init() // OpenGL, etc initialization w2 := openvg.VGfloat(width / 2) h2 := openvg.VGfloat(height / 2) w := openvg.VGfloat(width) openvg.Start(width, height) // Start the picture openvg.BackgroundColor("black") // Black background openvg.FillRGB(44, 100, 232, 1) // Big blue marble openvg.Circle(w2, 0, w) // The "world" openvg.FillColor("rgb(100,255,123)") // White text openvg.TextMid(w2, h2, "hello, world", "serif", width/10) // Greetings openvg.End() // End the picture bufio.NewReader(os.Stdin).ReadBytes('\n') // Pause until [RETURN] openvg.Finish() // Graphics cleanup } Functions The Init function provides the necessary graphics subsystem initialization and the dimensions of the whole canvas.
|
Package openvg is a wrapper to a C library of high-level 2D graphics operations built on OpenVG 1.1 The typical "hello world" program looks like this: package main import ( "bufio" "github.com/ajstarks/openvg" "os" ) func main() { width, height := openvg.Init() // OpenGL, etc initialization w2 := openvg.VGfloat(width / 2) h2 := openvg.VGfloat(height / 2) w := openvg.VGfloat(width) openvg.Start(width, height) // Start the picture openvg.BackgroundColor("black") // Black background openvg.FillRGB(44, 100, 232, 1) // Big blue marble openvg.Circle(w2, 0, w) // The "world" openvg.FillColor("rgb(100,255,123)") // White text openvg.TextMid(w2, h2, "hello, world", "serif", width/10) // Greetings openvg.End() // End the picture bufio.NewReader(os.Stdin).ReadBytes('\n') // Pause until [RETURN] openvg.Finish() // Graphics cleanup } Functions The Init function provides the necessary graphics subsystem initialization and the dimensions of the whole canvas. |
go-client/bubtrail
bubtrail draws a randmonized trail of bubbles
|
bubtrail draws a randmonized trail of bubbles |
go-client/chars
first OpenVG program
|
first OpenVG program |
go-client/clip
clip: test rectangular clipping
|
clip: test rectangular clipping |
go-client/clock
clock
|
clock |
go-client/colortab
colortab -- make a color/code placemat
|
colortab -- make a color/code placemat |
go-client/hellovg
first OpenVG program
|
first OpenVG program |
go-client/hgrad
first OpenVG program, with gradients
|
first OpenVG program, with gradients |
go-client/picshow
picshow: show pictures
|
picshow: show pictures |
go-client/planets
planets: an exploration of scale
|
planets: an exploration of scale |
go-client/randcircle
randcircle -- random circles
|
randcircle -- random circles |
go-client/raspi
raspberry pi self-portrait
|
raspberry pi self-portrait |
go-client/shapedemo
shapedemo demonstrates the OpenVG library
|
shapedemo demonstrates the OpenVG library |
go-client/splash
splash: show a splash screen image suggested by Mike Kazantsev
|
splash: show a splash screen image suggested by Mike Kazantsev |
go-client/twh
twh: time, weather, headlines
|
twh: time, weather, headlines |
go-client/vgplot
vgplot -- plot data (a stream of x,y coordinates)
|
vgplot -- plot data (a stream of x,y coordinates) |
util
raw2png - convert RGBA bytes to PNG
|
raw2png - convert RGBA bytes to PNG |
Click to show internal directories.
Click to hide internal directories.