imgg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2018 License: BSD-3-Clause Imports: 15 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructFontSizes

func ConstructFontSizes(basesize float64) map[chart.FontSize]float64

Types

type ImageGraphics

type ImageGraphics struct {
	Image *image.RGBA // The image the plots are drawn onto.
	// contains filtered or unexported fields
}

ImageGraphics writes plot to an image.RGBA

func AddTo

func AddTo(img *image.RGBA, x, y, width, height int, bgcol color.RGBA, font *truetype.Font, fontsize map[chart.FontSize]float64) *ImageGraphics

AddTo returns a new ImageGraphics which will write to (width x height) sized area starting at (x,y) on the provided image img. The rest of the parameters are the same as in New().

func New

func New(width, height int, bgcol color.RGBA, font *truetype.Font, fontsize map[chart.FontSize]float64) *ImageGraphics

New creates a new ImageGraphics including an image.RGBA of dimension w x h with background bgcol. If font is nil it will use a builtin font. If fontsize is empty useful default are used.

func (*ImageGraphics) Background

func (ig *ImageGraphics) Background() (r, g, b, a uint8)

func (*ImageGraphics) Bars

func (ig *ImageGraphics) Bars(bars []chart.Barinfo, style chart.Style)

func (*ImageGraphics) Begin

func (ig *ImageGraphics) Begin()

func (*ImageGraphics) Boxes

func (ig *ImageGraphics) Boxes(boxes []chart.Box, width int, style chart.Style)

func (*ImageGraphics) Dimensions

func (ig *ImageGraphics) Dimensions() (int, int)

func (*ImageGraphics) End

func (ig *ImageGraphics) End()

func (*ImageGraphics) FontMetrics

func (ig *ImageGraphics) FontMetrics(font chart.Font) (fw float32, fh int, mono bool)

func (*ImageGraphics) Key

func (ig *ImageGraphics) Key(x, y int, key chart.Key, options chart.PlotOptions)

func (*ImageGraphics) Line

func (ig *ImageGraphics) Line(x0, y0, x1, y1 int, style chart.Style)

func (*ImageGraphics) Options

func (ig *ImageGraphics) Options() chart.PlotOptions

func (*ImageGraphics) Path

func (ig *ImageGraphics) Path(x, y []int, style chart.Style)

func (*ImageGraphics) Rect

func (ig *ImageGraphics) Rect(x, y, w, h int, style chart.Style)

func (*ImageGraphics) Rings

func (ig *ImageGraphics) Rings(wedges []chart.Wedgeinfo, x, y, ro, ri int)

func (*ImageGraphics) Scatter

func (ig *ImageGraphics) Scatter(points []chart.EPoint, plotstyle chart.PlotStyle, style chart.Style)

func (*ImageGraphics) Symbol

func (ig *ImageGraphics) Symbol(x, y int, style chart.Style)

func (*ImageGraphics) Text

func (ig *ImageGraphics) Text(x, y int, t string, align string, rot int, f chart.Font)

func (*ImageGraphics) TextLen

func (ig *ImageGraphics) TextLen(s string, font chart.Font) int

func (*ImageGraphics) Wedge

func (ig *ImageGraphics) Wedge(ix, iy, iro, iri int, phi, psi float64, style chart.Style)

func (*ImageGraphics) XAxis

func (ig *ImageGraphics) XAxis(xr chart.Range, ys, yms int, options chart.PlotOptions)

func (*ImageGraphics) YAxis

func (ig *ImageGraphics) YAxis(yr chart.Range, xs, xms int, options chart.PlotOptions)

Jump to

Keyboard shortcuts

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