colorpath

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorPath

type ColorPath struct {
	sm.MapObject
	Positions []Point
	Weight    float64
}

ColorPath satisfies the map object interface for go-staticmap

func NewColorPath

func NewColorPath(weight float64) *ColorPath

NewColorPath builds a new path with colors

func (*ColorPath) Bounds

func (cp *ColorPath) Bounds() s2.Rect

Bounds returns the geographical boundary rect (excluding the actual pixel dimensions).

func (*ColorPath) Draw

func (cp *ColorPath) Draw(gc *gg.Context, trans *sm.Transformer)

Draw draws the colorpath in the given graphical context.

func (*ColorPath) ExtraMarginPixels

func (cp *ColorPath) ExtraMarginPixels() (float64, float64, float64, float64)

ExtraMarginPixels - to help go-staticmap find render bounds its just a line so no padding

type Point

type Point struct {
	s2.LatLng
	Color colorful.Color
}

Point is a coordinate and a color

Jump to

Keyboard shortcuts

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