primitive

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package primitive implements types and methods for working with fogleman/primitive package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	OutputSize int
	Shape      Shape
	Iterations int
	Repeat     int
	Alpha      int
	Extension  string
	// contains filtered or unexported fields
}

Config contains information needed to create primitive image.

func New

func New(workers int) Config

New initializes the instance of Config.

func (Config) Create

func (c Config) Create(inputPath, outputPath string) error

Create method creates a primitive image from an image in inputPath and saves result in outputPath.

type Shape

type Shape int

Shape implements enum of available shapes.

const (
	ShapeAny Shape = iota
	ShapeTriangle
	ShapeRectangle
	ShapeEllipse
	ShapeCircle
	ShapeRotatedRectangle
	ShapeBezier
	ShapeRotatedEllipse
	ShapePolygon
)

Shapes that can be used to create images.

Jump to

Keyboard shortcuts

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