raster

package
Version: v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package raster implements a Painter interface for rasterizing paths over a generic Image, using its ColorModel to convert from a generic raster color to the correct color model.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImagePainter

type ImagePainter struct {
	Image draw.Image
	// contains filtered or unexported fields
}

ImagePainter operates on a generic Image (not only sdl.Surfaces) and allows to rasterize a path using a specific color.

func NewImagePainter

func NewImagePainter(m draw.Image) *ImagePainter

NewImagePainter builds a Painter for a generic Image

func (*ImagePainter) Paint

func (p *ImagePainter) Paint(ss []raster.Span, done bool)

Paint a batch of Spans using the current ImagePainter image and color. Image's Color model will be used to convert the color.

func (*ImagePainter) SetColor

func (p *ImagePainter) SetColor(c color.Color)

SetColor set the color to use when rasterizing

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL