outline

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: BSD-3-Clause Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContourImage

func ContourImage(ctx context.Context, im image.Image, opts *ContourOptions) (image.Image, error)

func RasterizeBatik

func RasterizeBatik(ctx context.Context, opts *RasterizeOptions, input string) (image.Image, error)

func RasterizeNative

func RasterizeNative(ctx context.Context, opts *RasterizeOptions, input string) (image.Image, error)

func Trace

func Trace(ctx context.Context, input string, output string, trace_opts *TraceOptions, raster_opts *RasterizeOptions) (image.Image, error)

func Vtrace

func Vtrace(ctx context.Context, input string, output string, opts *TraceOptions) error

Types

type ContourFormat

type ContourFormat uint8
const (
	PNG ContourFormat = iota
	SVG
)

type ContourOptions

type ContourOptions struct {
	Iterations int
	Scale      float64
	Format     string
}

type Outline

type Outline interface {
	Write(context.Context, io.Writer) error
}

func Contour

func Contour(ctx context.Context, im image.Image, opts *ContourOptions) (Outline, error)

func ContourPNG

func ContourPNG(ctx context.Context, im image.Image, opts *ContourOptions) (Outline, error)

func ContourSVG

func ContourSVG(ctx context.Context, im image.Image, opts *ContourOptions) (Outline, error)

func GenerateOutline

func GenerateOutline(ctx context.Context, im image.Image, opts *OutlineOptions) (Outline, error)

type OutlineOptions

type OutlineOptions struct {
	Contour   *ContourOptions
	Trace     *TraceOptions
	Rasterize *RasterizeOptions
}

type PNGOutline

type PNGOutline struct {
	Outline
	// contains filtered or unexported fields
}

func (*PNGOutline) Write

func (o *PNGOutline) Write(ctx context.Context, wr io.Writer) error

type RasterizeOptions

type RasterizeOptions struct {
	UseBatik  bool
	PathBatik string
}

type SVGOutline

type SVGOutline struct {
	Outline
	// contains filtered or unexported fields
}

func (*SVGOutline) Write

func (o *SVGOutline) Write(ctx context.Context, wr io.Writer) error

type TraceOptions

type TraceOptions struct {
	Precision int
	Speckle   int
}

Jump to

Keyboard shortcuts

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