Rough
Rough is a library that allows you draw in a sketchy, hand-drawn-like style. It's a direct port of Rough.js.
Installation
In the dependencies:
section of your pubspec.yaml
, add the following line:
Basic usage
Right now only drawing via canvas is supported. This is a basic documentation in case you want to play around with Rough. I can't ensure non-breaking changes of the library interface.
To draw a figure you have to:
- Create a
DrawConfig
object to determine how your drawing will look. - Create a
Filler
to be used when drawing objects (you have to provide a configuration for the filling and aDrawConfig
for the filling path). - Create a
Generator
object using the createdDrawConfig
andFiller
. This will define a drawing/filling style. - Invoke the drawing method from the
Generator
to create aDrawable
. - Paint the
Drawable
in the canvas using thedrawRough
method extension forCanvas
.
Here an example on how to draw a circle:
And this is the result:
Both DrawConfig
and FillerConfig
will use default values for anything not specified.
Samples
Some screenshots of the example app: