Version: v0.0.0-...-acf4043 Latest Latest

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause, MIT, Unlicense Imports: 9 Imported by: 0




This section is empty.


View Source
var (
	MinInf = float32(math.Inf(-1))
	MaxInf = float32(math.Inf(1))
View Source
var RGBAModel color.Model = color.ModelFunc(rgbaModel)

RGBAModel is a color.Model that can convert any color.Color to a color.RGBA that can be passed to Gio. It will pre-multiply a translucent color in such a way that it correctly blends over an opaque background color.

Note: we keep this around to see if we need this when we use translucent gradients. Because Gio now requires NRGBA colors the conversion that was originally done here is done inside Gio.

yellow := color.NRGBA{0xfd, 0xee, 0x74, 0x7f}
rgba := gio.RGBAModel.Convert(yellow).(color.RGBA)


This section is empty.


type Rasterizer

type Rasterizer struct {
	Ops *op.Ops
	// contains filtered or unexported fields

func NewRasterizer

func NewRasterizer(ops *op.Ops, w, h int) *Rasterizer

func (*Rasterizer) Bounds

func (v *Rasterizer) Bounds() image.Rectangle

func (*Rasterizer) ClosePath

func (v *Rasterizer) ClosePath()

func (*Rasterizer) CubeTo

func (v *Rasterizer) CubeTo(bx, by, cx, cy, dx, dy float32)

func (*Rasterizer) Draw

func (v *Rasterizer) Draw(r image.Rectangle, src image.Image, sp image.Point)

func (*Rasterizer) LineTo

func (v *Rasterizer) LineTo(bx, by float32)

func (*Rasterizer) MoveTo

func (v *Rasterizer) MoveTo(ax, ay float32)

func (*Rasterizer) Op

func (v *Rasterizer) Op() clip.Op

func (*Rasterizer) Path

func (v *Rasterizer) Path() *clip.Path

func (*Rasterizer) Pen

func (v *Rasterizer) Pen() (x, y float32)

func (*Rasterizer) QuadTo

func (v *Rasterizer) QuadTo(bx, by, cx, cy float32)

func (*Rasterizer) Reset

func (v *Rasterizer) Reset(w, h int)

func (*Rasterizer) Size

func (v *Rasterizer) Size() image.Point

func (*Rasterizer) To

func (v *Rasterizer) To(x, y float32) f32.Point

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to