raster

package module
v0.0.0-...-ee2fe39 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

README

Experiments on rasterizing polygons on raster image in golang

Documentation

Overview

Copyright 2011 The draw2d Authors. All rights reserved. created: 27/05/2011 by Laurent Le Goff

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bresenham

func Bresenham(img draw.Image, color color.Color, x0, y0, x1, y1 int)

func DrawSolidRGBA

func DrawSolidRGBA(dest *image.RGBA, mask *image.Alpha, rgba color.RGBA)

Renders the mask to the canvas

func PolylineBresenham

func PolylineBresenham(img draw.Image, c color.Color, s ...float64)

Types

type Intersection

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

type Polygon

type Polygon []float64

Polygon is a slice of coordinate

type Rasterizer

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

func NewRasterizer

func NewRasterizer() *Rasterizer

func (*Rasterizer) Fill

func (r *Rasterizer) Fill(img *image.Alpha, p Polygon, nonZeroWindingRule bool)

Jump to

Keyboard shortcuts

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