Documentation
¶
Overview ¶
Package openvg is a high-level 2D vector graphics library built on OpenVG
Index ¶
- func Arc(x, y, w, h, sa, aext float32, style ...string)
- func Background(r, g, b uint8)
- func BackgroundColor(s string, alpha ...float32)
- func BackgroundRGB(r, g, b uint8, alpha float32)
- func Cbezier(sx, sy, cx, cy, px, py, ex, ey float32, style ...string)
- func Circle(x, y, r float32, style ...string)
- func Ellipse(x, y, w, h float32, style ...string)
- func End()
- func FillColor(s string, alpha ...float32)
- func FillLinearGradient(x1, y1, x2, y2 float32, ramp []Offcolor)
- func FillRGB(r, g, b uint8, alpha float32)
- func FillRadialGradient(cx, cy, fx, fy, radius float32, ramp []Offcolor)
- func Finish()
- func Image(x, y float32, w, h int, s string)
- func Img(x, y float32, im image.Image)
- func Init() (int, int)
- func Line(x1, y1, x2, y2 float32, style ...string)
- func Polygon(x, y []float32, style ...string)
- func Polyline(x, y []float32, style ...string)
- func Qbezier(sx, sy, cx, cy, ex, ey float32, style ...string)
- func RawTerm()
- func Rect(x, y, w, h float32, style ...string)
- func RestoreTerm()
- func Rotate(r float32)
- func Roundrect(x, y, w, h, rw, rh float32, style ...string)
- func SaveEnd(filename string)
- func SaveTerm()
- func Scale(x, y float32)
- func Shear(x, y float32)
- func Start(w, h int, color ...uint8)
- func StartColor(w, h int, color string, alpha ...float32)
- func StrokeColor(s string, alpha ...float32)
- func StrokeRGB(r, g, b uint8, alpha float32)
- func StrokeWidth(w float32)
- func Text(x, y float32, s string, font string, size int, style ...string)
- func TextEnd(x, y float32, s string, font string, size int, style ...string)
- func TextMid(x, y float32, s string, font string, size int, style ...string)
- func TextWidth(s string, font string, size int) float32
- func Translate(x, y float32)
- type Offcolor
- type RGB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arc ¶
Arc draws an arc at (x,y) with dimensions (w,h). the arc starts at the angle sa, extended to aext
func Background ¶
func Background(r, g, b uint8)
Background clears the screen with the specified solid background color using RGB triples
func BackgroundColor ¶
BackgroundColor sets the background color
func BackgroundRGB ¶
BackgroundRGB clears the screen with the specified background color using a RGBA quad
func Cbezier ¶
Cbezier draws a cubic bezier curve with extrema (sx, sy) and (ex, ey). Control points at (cx, cy) and (px, py)
func FillColor ¶
FillColor sets the fill color using names to specify the color, optionally applying alpha.
func FillLinearGradient ¶
FillLinearGradient sets up a linear gradient between (x1,y2) and (x2, y2) using the specified offsets and colors in ramp
func FillRadialGradient ¶
FillRadialGradient sets up a radial gradient centered at (cx, cy), radius r, with a focal point at (fx, fy) using the specified offsets and colors in ramp
func Image ¶
Image places the named image at (x,y) with dimensions (w,h) the derived image dimensions override the specified ones.
func Qbezier ¶
Qbezier draws a quadratic bezier curve with extrema (sx, sy) and (ex, ey) Control points are at (cx, cy)
func Roundrect ¶
Roundrect draws a rounded rectangle at (x,y) with dimesions (w,h). the corner radii are at (rw, rh)
func StartColor ¶
StartColor begins the picture with the specified color background
func StrokeColor ¶
StrokeColor sets the fill color using names to specify the color, optionally applying alpha.