Generator creates Rough.js-compatible drawing operations.
A Generator retains the same mutable default-option random state as
Rough.js. Its methods are safe for concurrent use, though callers that need
independent deterministic streams should use separate generators. Arc creates a rough elliptical arc. Circle creates a rough circle centered at x,y. Curve creates a rough curve through points. DefaultOptions returns a value copy of the generator's current defaults. Ellipse creates a rough ellipse centered at x,y. Line creates a rough line. LinearPath creates an open rough path through points. OpsToPath serializes operations using Rough.js's SVG punctuation and number
formatting. Path creates a rough rendering of SVG path data. Polygon creates a closed rough polygon. Rectangle creates a rough rectangle. ToPaths converts a Drawable into the ordered SVG path descriptions emitted
by Rough.js's generator API.
func NewGenerator(config *Config, surface ...*Surface) *Generator
Line is a line segment represented by its two endpoints.
Op is one path operation and its ordered numeric arguments.Data[]float64OpOpType
Bool returns a pointer suitable for a boolean Options field.
Float64 returns a pointer suitable for a numeric Options field.
NewGenerator creates a generator. A nil config uses Rough.js 4.6.6's
defaults. The optional surface supplies patterned-path fallback dimensions.
NewSeed returns a nondeterministic seed in Rough.js's supported range.
NumberString formats v the way JavaScript coerces a Number to a string.
It is useful when surrounding SVG serialization must remain byte-compatible
with Rough.js output.
String returns a pointer suitable for a string Options field.
The pages are generated with Goldsv0.8.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.