gio

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: MIT Imports: 8 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gio

type Gio struct {
	// contains filtered or unexported fields
}

func New

func New(gtx layout.Context, width, height float64) *Gio

New returns a Gio renderer of fixed size.

func NewContain

func NewContain(gtx layout.Context, width, height float64) *Gio

NewContain returns a Gio renderer that fills the constraints either horizontally or vertically, whichever is met first.

func NewStretch

func NewStretch(gtx layout.Context, width, height float64) *Gio

NewStretch returns a Gio renderer that stretches the view to fit the constraints.

func (*Gio) Dimensions

func (r *Gio) Dimensions() layout.Dimensions

Dimensions returns the dimensions for Gio.

func (*Gio) RenderImage

func (r *Gio) RenderImage(img image.Image, m canvas.Matrix)

RenderImage renders an image to the canvas using a transformation matrix.

func (*Gio) RenderPath

func (r *Gio) RenderPath(path *canvas.Path, style canvas.Style, m canvas.Matrix)

RenderPath renders a path to the canvas using a style and a transformation matrix.

func (*Gio) RenderText

func (r *Gio) RenderText(text *canvas.Text, m canvas.Matrix)

RenderText renders a text object to the canvas using a transformation matrix.

func (*Gio) Size

func (r *Gio) Size() (float64, float64)

Size returns the size of the canvas in millimeters.

Jump to

Keyboard shortcuts

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