gioui.org: gioui.org/op/paint Index | Files

package paint

import "gioui.org/op/paint"

Package paint provides drawing operations for 2D graphics.

The PaintOp operation draws the current material into a rectangular area, taking the current clip path and transformation into account.

The material is set by either a ColorOp for a constant color, or ImageOp for an image.

Index

Package Files

doc.go paint.go

type ColorOp Uses

type ColorOp struct {
    Color color.RGBA
}

ColorOp sets the material to a constant color.

func (ColorOp) Add Uses

func (c ColorOp) Add(o *op.Ops)

type ImageOp Uses

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

ImageOp sets the material to an image.

func NewImageOp Uses

func NewImageOp(src image.Image) ImageOp

func (ImageOp) Add Uses

func (i ImageOp) Add(o *op.Ops)

func (ImageOp) Size Uses

func (i ImageOp) Size() image.Point

type PaintOp Uses

type PaintOp struct {
    Rect f32.Rectangle
}

PaintOp draws the current material, respecting the clip path and transformation.

func (PaintOp) Add Uses

func (d PaintOp) Add(o *op.Ops)

Package paint imports 8 packages (graph) and is imported by 10 packages. Updated 2019-11-22. Refresh now. Tools for package owners.