Index | Files

package paint

import ""

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.


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 {
    Rect image.Rectangle
    // 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 18 packages. Updated 2020-03-28. Refresh now. Tools for package owners.