Documentation ¶
Index ¶
- Constants
- func Distance(p1 Point, p2 Point) float64
- func DistanceSq(p1 Point, p2 Point) float64
- func DistanceToSegmentSq(p Point, v Point, w Point) float64
- func DoIntersect(p1, q1, p2, q2 Point) bool
- func DrawSVG(s *svg.SVG, d Drawable, groupAttrs Attributes)
- func IsPointInPolygon(points []Point, point Point) bool
- func NewArc(center Point, width, height, start, stop float64, closed bool, ...) *arc
- func NewCircle(center Point, diameter float64, opt *EllipseOptions) *circle
- func NewCurve(points []Point, opt *EllipseOptions) *curve
- func NewEllipse(center Point, width, height float64, opt *EllipseOptions) *ellipse
- func NewLine(p1, p2 Point, opt *LineOptions) *line
- func NewLinearPath(points []Point, opt *LineOptions) *linearPath
- func NewPath(d string, opt *PathOptions) (*path, error)
- func NewPoligon(points []Point, opt *LineOptions) *poligon
- func NewRectangle(p Point, width, height float64, opt *RectangleOptions) *rectangle
- func PointsOnPath(path string, tolerance float64, distance float64) (out [][]Point, err error)
- func RotateLines(lines *[]Line, center Point, degrees float64)
- func RotatePoints(points *[]Point, center Point, degrees float64)
- type Attributes
- type CurveOptions
- type Drawable
- type EllipseOptions
- type Filler
- type Line
- type LineOptions
- type PathOptions
- type PenOptions
- type Point
- type RectangleOptions
- type Styles
Constants ¶
View Source
const (
None = "none"
)
Variables ¶
This section is empty.
Functions ¶
func DistanceSq ¶
DistanceSq returns the distance between 2 points square
func DistanceToSegmentSq ¶
DistanceToSegmentSq returns the distance squared from a point p to the line segment vw
func DoIntersect ¶
func DrawSVG ¶
func DrawSVG(s *svg.SVG, d Drawable, groupAttrs Attributes)
func IsPointInPolygon ¶
func NewArc ¶
func NewArc(center Point, width, height, start, stop float64, closed bool, opt *EllipseOptions) *arc
func NewCircle ¶
func NewCircle(center Point, diameter float64, opt *EllipseOptions) *circle
func NewCurve ¶
func NewCurve(points []Point, opt *EllipseOptions) *curve
func NewEllipse ¶
func NewEllipse(center Point, width, height float64, opt *EllipseOptions) *ellipse
func NewLine ¶
func NewLine(p1, p2 Point, opt *LineOptions) *line
func NewLinearPath ¶
func NewLinearPath(points []Point, opt *LineOptions) *linearPath
func NewPath ¶
func NewPath(d string, opt *PathOptions) (*path, error)
func NewPoligon ¶
func NewPoligon(points []Point, opt *LineOptions) *poligon
func NewRectangle ¶
func NewRectangle(p Point, width, height float64, opt *RectangleOptions) *rectangle
func PointsOnPath ¶
func RotateLines ¶
func RotatePoints ¶
Types ¶
type Attributes ¶
func (Attributes) Exclude ¶
func (a Attributes) Exclude(attrs ...string) Attributes
func (Attributes) HasAttr ¶
func (a Attributes) HasAttr(name string) bool
func (Attributes) String ¶
func (a Attributes) String() string
type CurveOptions ¶
func CurveOptionsDefault ¶
func CurveOptionsDefault() *CurveOptions
type Drawable ¶
type Drawable interface { Name() string Operations() []operation Attributes() Attributes Styles() *Styles }
type EllipseOptions ¶
type EllipseOptions struct { PenOptions *PenOptions CurveOptions *CurveOptions Styles *Styles }
type Filler ¶
type Filler interface { SetAngle(float64) SetGap(float64) // contains filtered or unexported methods }
func NewDashedFiller ¶
func NewDotFiller ¶
func NewDotFiller() Filler
func NewHachureFiller ¶
func NewHachureFiller() Filler
func NewHatchFiller ¶
func NewHatchFiller() Filler
func NewZigZagFiller ¶
func NewZigZagFiller() Filler
func NewZigZagHatchFiller ¶
func NewZigZagHatchFiller() Filler
type LineOptions ¶
type LineOptions struct { PenOptions *PenOptions Styles *Styles }
type PathOptions ¶
type PathOptions struct { PenOptions *PenOptions Styles *Styles Simplification float64 CombineNestedSvgPaths bool }
type PenOptions ¶
func PenOptionsDefault ¶
func PenOptionsDefault() *PenOptions
type RectangleOptions ¶
type RectangleOptions struct { PenOptions *PenOptions Styles *Styles }
Source Files ¶
- curveToBezier.go
- drawable.go
- filler.go
- fillerDashed.go
- fillerDot.go
- fillerHachure.go
- fillerHatch.go
- fillerZigZag.go
- fillerZigZagHatch.go
- geometry.go
- options.go
- pointsOnBezierCurves.go
- pointsOnPath.go
- renderer.go
- shape.go
- shapeArc.go
- shapeCircle.go
- shapeCurve.go
- shapeEllipse.go
- shapeLine.go
- shapeLinearPath.go
- shapePath.go
- shapePoligon.go
- shapeRectangle.go
- simplify.go
Click to show internal directories.
Click to hide internal directories.