build static method
Generates a DrawConfig
roughness
Numerical value indicating how rough the drawing is. A rectangle with the roughness of 0 would be a perfect rectangle. Default value is 1. There is no upper limit to this value, but a value over 10 is mostly useless.bowing
Numerical value indicating how curvy the lines are when drawing a sketch. A value of 0 will cause straight lines. Default value is 1.seed
The seed for creating random values used in shape generation. This is useful for creating the exact shape when re-generating with the same parameters. Default value is 1.curveStepCount
When drawing ellipses, circles, and arcs, Rough approximatescurveStepCount
number of points to estimate the shape. Default value is 9.curveTightness
curveFitting
When drawing ellipses, circles, and arcs, it means how close should the rendered dimensions be when compared to the specified one. Default value is 0.95.
Implementation
static DrawConfig build({
double? maxRandomnessOffset,
double? roughness,
double? bowing,
double? curveFitting,
double? curveTightness,
double? curveStepCount,
int? seed,
}) =>
DrawConfig._(
maxRandomnessOffset:
maxRandomnessOffset ?? defaultValues.maxRandomnessOffset,
roughness: roughness ?? defaultValues.roughness,
bowing: bowing ?? defaultValues.bowing,
curveFitting: curveFitting ?? defaultValues.curveFitting,
curveTightness: curveTightness ?? defaultValues.curveTightness,
curveStepCount: curveStepCount ?? defaultValues.curveStepCount,
seed: seed ?? defaultValues.seed,
randomizer: Randomizer(seed: seed ?? defaultValues.seed!));