Documentation ¶
Index ¶
- func ConstructFontSizes(basesize float64) map[chart.FontSize]float64
- type ImageGraphics
- func (ig *ImageGraphics) Background() (r, g, b, a uint8)
- func (ig *ImageGraphics) Bars(bars []chart.Barinfo, style chart.Style)
- func (ig *ImageGraphics) Begin()
- func (ig *ImageGraphics) Boxes(boxes []chart.Box, width int, style chart.Style)
- func (ig *ImageGraphics) Dimensions() (int, int)
- func (ig *ImageGraphics) End()
- func (ig *ImageGraphics) FontMetrics(font chart.Font) (fw float32, fh int, mono bool)
- func (ig *ImageGraphics) Key(x, y int, key chart.Key, options chart.PlotOptions)
- func (ig *ImageGraphics) Line(x0, y0, x1, y1 int, style chart.Style)
- func (ig *ImageGraphics) Options() chart.PlotOptions
- func (ig *ImageGraphics) Path(x, y []int, style chart.Style)
- func (ig *ImageGraphics) Rect(x, y, w, h int, style chart.Style)
- func (ig *ImageGraphics) Rings(wedges []chart.Wedgeinfo, x, y, ro, ri int)
- func (ig *ImageGraphics) Scatter(points []chart.EPoint, plotstyle chart.PlotStyle, style chart.Style)
- func (ig *ImageGraphics) Symbol(x, y int, style chart.Style)
- func (ig *ImageGraphics) Text(x, y int, t string, align string, rot int, f chart.Font)
- func (ig *ImageGraphics) TextLen(s string, font chart.Font) int
- func (ig *ImageGraphics) Wedge(ix, iy, iro, iri int, phi, psi float64, style chart.Style)
- func (ig *ImageGraphics) XAxis(xr chart.Range, ys, yms int, options chart.PlotOptions)
- func (ig *ImageGraphics) YAxis(yr chart.Range, xs, xms int, options chart.PlotOptions)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) Begin ¶
func (ig *ImageGraphics) Begin()
func (*ImageGraphics) Dimensions ¶
func (ig *ImageGraphics) Dimensions() (int, int)
func (*ImageGraphics) End ¶
func (ig *ImageGraphics) End()
func (*ImageGraphics) FontMetrics ¶
func (*ImageGraphics) Key ¶
func (ig *ImageGraphics) Key(x, y int, key chart.Key, options chart.PlotOptions)
func (*ImageGraphics) Options ¶
func (ig *ImageGraphics) Options() chart.PlotOptions
func (*ImageGraphics) Rings ¶
func (ig *ImageGraphics) Rings(wedges []chart.Wedgeinfo, x, y, ro, ri 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)
Click to show internal directories.
Click to hide internal directories.