paint

package
v0.0.0-...-d956aad Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: Unlicense Imports: 8 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorOp

type ColorOp struct {
	Color color.RGBA
}

ColorOp sets the material to a constant color.

func (ColorOp) Add

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

type ImageOp

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

ImageOp sets the material to an image.

func NewImageOp

func NewImageOp(src image.Image) ImageOp

func (ImageOp) Add

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

func (ImageOp) Size

func (i ImageOp) Size() image.Point

type PaintOp

type PaintOp struct {
	Rect f32.Rectangle
}

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

func (PaintOp) Add

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

Jump to

Keyboard shortcuts

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