Documentation ¶
Index ¶
- Constants
- Variables
- func Backends() []string
- func GreymapRead(f *stdio.File, gmp **Greymap) int
- func Render(backend string, conf *RenderConf, out io.Writer, paths *Path, ...) error
- func RenderFile(backend string, conf *RenderConf, out string, paths *Path, width, height int) error
- type BackendInfo
- type Bitmap
- func BitmapFromGray(img *image.Gray, fnc func(c color.Gray) bool) *Bitmap
- func BitmapFromGray16(img *image.Gray16, fnc func(c color.Gray16) bool) *Bitmap
- func BitmapFromImage(img image.Image, fnc func(c color.Color) bool) *Bitmap
- func BitmapFromNRGBA(img *image.NRGBA, fnc func(c color.NRGBA) bool) *Bitmap
- func BitmapFromRGBA(img *image.RGBA, fnc func(c color.RGBA) bool) *Bitmap
- func BitmapRead(r io.Reader, threshold float64) (*Bitmap, error)
- func BitmapReadFile(path string, threshold float64) (*Bitmap, error)
- func NewBitmap(w int, h int) *Bitmap
- type Config
- type Curve
- type DPoint
- type Dim
- type FileConfig
- type Greymap
- type Path
- type Point
- type Progress
- type RenderConf
- type Sample
- type Word
Constants ¶
View Source
const DefaultPaperHeight = 792
View Source
const DefaultPaperWidth = 612
View Source
const GM_MODE_NEGATIVE = 4
View Source
const GM_MODE_NONZERO = 1
View Source
const GM_MODE_ODD = 2
View Source
const GM_MODE_POSITIVE = 3
View Source
const POTRACE_CORNER = 2
View Source
const POTRACE_CURVETO = 1
View Source
const TurnBlack = 0
View Source
const TurnLeft = 2
View Source
const TurnMajority = 5
View Source
const TurnMinority = 4
View Source
const TurnRandom = 6
View Source
const TurnRight = 3
View Source
const TurnWhite = 1
View Source
const Version = "1.16"
Variables ¶
View Source
var (
ErrIncomplete = errors.New("tracing incomplete")
)
Functions ¶
func RenderFile ¶
RenderFile writes paths with a given backend to a file.
Types ¶
type BackendInfo ¶
type Bitmap ¶
func BitmapFromGray16 ¶
type Config ¶
type Config struct { TurdSize int TurnPolicy int AlphaMax float64 OptiCurve bool OptTolerance float64 Progress Progress }
func DefaultConfig ¶
func DefaultConfig() *Config
type FileConfig ¶
type Greymap ¶
func NewGreymap ¶
type Path ¶
type RenderConf ¶
type RenderConf struct { Backend *BackendInfo Debug bool Width_d Dim Height_d Dim Rx float64 Ry float64 Sx float64 Sy float64 Stretch float64 Lmar_d Dim Rmar_d Dim Tmar_d Dim Bmar_d Dim Angle float64 Paperwidth int Paperheight int Tight int Unit float64 Compress bool Pslevel int Color int Fillcolor int Gamma float64 Longcoding int Outfile *byte Infiles **byte Infilecount int Some_infiles int Blacklevel float64 Invert int Opaque bool Grouping int Progress int }
func NewRenderConf ¶
func NewRenderConf() *RenderConf
NewRenderConf creates a default render config.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.