DrawConfig class

Configuration for how shapes are drawn with a rough/sketchy style.

This class controls various aspects of the sketchy rendering including roughness, bowing, and curve fitting parameters.

Constructors

DrawConfig.build({double? maxRandomnessOffset, double? roughness, double? bowing, double? curveFitting, double? curveTightness, double? curveStepCount, int? seed})
Creates a DrawConfig with the specified parameters.
factory

Properties

bowing double
Controls how much lines bow/curve. A value of 0 creates straight lines.
final
curveFitting double
Controls how closely curves match the specified dimensions.
final
curveStepCount double
Number of points used to approximate curves.
final
curveTightness double
Controls how tight curves are drawn.
final
hashCode int
The hash code for this object.
no setteroverride
maxRandomnessOffset double
Maximum random offset applied to points.
final
randomizer Randomizer
The randomizer used for generating random values.
final
roughness double
Controls how rough the drawing is. A value of 0 creates perfect shapes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seed int
Seed for random number generation.
final

Methods

copyWith({double? maxRandomnessOffset, double? roughness, double? bowing, double? curveFitting, double? curveTightness, double? curveStepCount, double? fillWeight, int? seed, bool? combineNestedSvgPaths, Randomizer? randomizer}) DrawConfig
Creates a copy of this configuration with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(double min, double max, [double roughnessGain = 1]) double
Generates a random offset between min and max based on roughness.
offsetSymmetric(double x, [double roughnessGain = 1]) double
Generates a random offset between -x and x based on roughness.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

defaultValues DrawConfig
Default configuration values for drawing.
final