plotgio

package module
v0.0.0-...-6b31088 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Canvas

type Canvas struct {
	Shaper *text.Shaper
	// contains filtered or unexported fields
}

Canvas describes the top-level ptx drawing context.

func New

func New(shaper *text.Shaper, size f32.Point) *Canvas

New creates a new SVG canvas.

func (*Canvas) Add

func (c *Canvas) Add(gtx layout.Context)

Layout renders plot to gtx.

func (*Canvas) Bounds

func (ptx *Canvas) Bounds() plot.Rect

Bounds returns the bounds in the global size.

func (*Canvas) Clip

func (ptx *Canvas) Clip(r plot.Rect) plot.Canvas

Clip clips to rect.

func (*Canvas) Context

func (ptx *Canvas) Context(r plot.Rect) plot.Canvas

context creates a subcontext bounded to r.

func (*Canvas) Layer

func (ptx *Canvas) Layer(index int) plot.Canvas

Layer returns an layer above or below current state.

func (*Canvas) Poly

func (ptx *Canvas) Poly(points []plot.Point, style *plot.Style)

Poly draws a polygon.

func (*Canvas) Rect

func (ptx *Canvas) Rect(r plot.Rect, style *plot.Style)

Rect draws a rectangle.

func (*Canvas) Size

func (ptx *Canvas) Size() plot.Point

Size returns the size of the context.

func (*Canvas) Text

func (ptx *Canvas) Text(text string, at plot.Point, style *plot.Style)

Text draws text.

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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