geometry

package
v0.0.0-...-675e82c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2019 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package geometry draws some geometric tests.

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL