Documentation ¶
Overview ¶
Package geometry draws some geometric tests.
Index ¶
- func Arc(gc draw2d.GraphicContext, xc, yc, width, height float64)
- func ArcNegative(gc draw2d.GraphicContext, xc, yc, width, height float64)
- func Bubble(gc draw2d.GraphicContext, x, y, width, height float64)
- func CubicCurve(gc draw2d.GraphicContext, x, y, width, height float64)
- func CurveRectangle(gc draw2d.GraphicContext, x0, y0, rectWidth, rectHeight float64, ...)
- func Dash(gc draw2d.GraphicContext, x, y, width, height float64)
- func Draw(gc draw2d.GraphicContext, width, height float64)
- func FillString(gc draw2d.GraphicContext, x, y, width, height float64)
- func FillStroke(gc draw2d.GraphicContext, x, y, width, height float64)
- func FillStyle(gc draw2d.GraphicContext, x, y, width, height float64)
- func Main(gc draw2d.GraphicContext, ext string) (string, error)
- func PathTransform(gc draw2d.GraphicContext, x, y, width, height float64)
- func Star(gc draw2d.GraphicContext, x, y, width, height float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Arc ¶
func Arc(gc draw2d.GraphicContext, xc, yc, width, height float64)
Arc draws an arc with a positive angle (clockwise)
func ArcNegative ¶
func ArcNegative(gc draw2d.GraphicContext, xc, yc, width, height float64)
ArcNegative draws an arc with a negative angle (anti clockwise).
func Bubble ¶
func Bubble(gc draw2d.GraphicContext, x, y, width, height float64)
Bubble draws a text balloon.
func CubicCurve ¶
func CubicCurve(gc draw2d.GraphicContext, x, y, width, height float64)
CubicCurve draws a cubic curve with its control points.
func CurveRectangle ¶
func CurveRectangle(gc draw2d.GraphicContext, x0, y0, rectWidth, rectHeight float64, stroke, fill color.Color)
CurveRectangle draws a rectangle with bezier curves (not rounded rectangle).
func Dash ¶
func Dash(gc draw2d.GraphicContext, x, y, width, height float64)
Dash draws a line with a dash pattern
func Draw ¶
func Draw(gc draw2d.GraphicContext, width, height float64)
Draw all figures in a nice 4x3 grid.
func FillString ¶
func FillString(gc draw2d.GraphicContext, x, y, width, height float64)
FillString draws a filled and stroked string. And filles/stroked path created from string. Which may have different - unselectable - output in non raster gc implementations.
func FillStroke ¶
func FillStroke(gc draw2d.GraphicContext, x, y, width, height float64)
FillStroke first fills and afterwards strokes a path.
func FillStyle ¶
func FillStyle(gc draw2d.GraphicContext, x, y, width, height float64)
FillStyle demonstrates the difference between even odd and non zero winding rule.
func Main ¶
func Main(gc draw2d.GraphicContext, ext string) (string, error)
Main draws geometry and returns the filename. This should only be used during testing.
func PathTransform ¶
func PathTransform(gc draw2d.GraphicContext, x, y, width, height float64)
PathTransform scales a path differently in horizontal and vertical direction.
func Star ¶
func Star(gc draw2d.GraphicContext, x, y, width, height float64)
Star draws many lines from a center.
Types ¶
This section is empty.