MCPcopy Create free account
hub / github.com/fogleman/primitive / init

Function init

main.go:64–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62}
63
64func init() {
65 flag.StringVar(&Input, "i", "", "input image path")
66 flag.Var(&Outputs, "o", "output image path")
67 flag.Var(&Configs, "n", "number of primitives")
68 flag.StringVar(&Background, "bg", "", "background color (hex)")
69 flag.IntVar(&Alpha, "a", 128, "alpha value")
70 flag.IntVar(&InputSize, "r", 256, "resize large input images to this size")
71 flag.IntVar(&OutputSize, "s", 1024, "output image size")
72 flag.IntVar(&Mode, "m", 1, "0=combo 1=triangle 2=rect 3=ellipse 4=circle 5=rotatedrect 6=beziers 7=rotatedellipse 8=polygon")
73 flag.IntVar(&Workers, "j", 0, "number of parallel workers (default uses all cores)")
74 flag.IntVar(&Nth, "nth", 1, "save every Nth frame (put \"%d\" in path)")
75 flag.IntVar(&Repeat, "rep", 0, "add N extra shapes per iteration with reduced search")
76 flag.BoolVar(&V, "v", false, "verbose")
77 flag.BoolVar(&VV, "vv", false, "very verbose")
78}
79
80func errorMessage(message string) bool {
81 fmt.Fprintln(os.Stderr, message)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…