script

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

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

Go to latest
Published: Jul 6, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

writing-system-generator

A command line tool and Go library for procedurally generating fictional writing systems.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Glyph

type Glyph struct {
	Representation string
	Strokes        []Stroke
	Width          int
	Height         int
	GridSizeX      int
	GridSizeY      int
}

Glyph represents a single glyph

func (Glyph) Render

func (glyph Glyph) Render()

Render draws and saves a glyph

type Point

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

Point is a coordinate on a 2D plane

func (Point) Equals

func (point Point) Equals(otherPoint Point) bool

Equals compares two points to see if they're equivalent

type Script

type Script struct {
	Glyphs []Glyph
}

Script is a writing system script

func Generate

func Generate() Script

Generate procedurally generates a set of glyphs

func (Script) RenderGlyphImages

func (script Script) RenderGlyphImages()

RenderGlyphImages runs the render process for each glyph in a script

func (Script) RenderHTML

func (script Script) RenderHTML()

RenderHTML renders an HTML version of a script

type Stroke

type Stroke struct {
	Type   string
	Points []Point
	Render func(image gg.Context)
}

Stroke is a single element of a glyph

Directories

Path Synopsis
cmd
genwrite command

Jump to

Keyboard shortcuts

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