All Projects → sergiandreplace → flutter_rough

sergiandreplace / flutter_rough

Licence: MIT license
A Flutter implementation of the rough.js library

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to flutter rough

pixelino
Pixel-drawing app for iOS ✍️
Stars: ✭ 45 (-41.56%)
Mutual labels:  art, drawing
FuncMorph
Crazy figures and animations with Haskell
Stars: ✭ 30 (-61.04%)
Mutual labels:  art, drawing
durdraw
Animated Unicode, ANSI and ASCII Art Editor for Linux/Unix/macOS
Stars: ✭ 55 (-28.57%)
Mutual labels:  art, drawing
DrawBot
Repository for DrawBot. The Discord Art bot!
Stars: ✭ 11 (-85.71%)
Mutual labels:  art, drawing
Mopaint
🎨💪 Modern, modular paint and more! (pre-alpha, not much done yet)
Stars: ✭ 50 (-35.06%)
Mutual labels:  art, drawing
Tart
Tart - draw ASCII art in the terminal with your mouse!
Stars: ✭ 296 (+284.42%)
Mutual labels:  art, drawing
fishdraw
procedurally generated fish drawings
Stars: ✭ 1,963 (+2449.35%)
Mutual labels:  art, drawing
Mypaint
MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.
Stars: ✭ 2,072 (+2590.91%)
Mutual labels:  art, drawing
Galeri Www
A perpetual artwork streaming app. (Website Repo)
Stars: ✭ 46 (-40.26%)
Mutual labels:  art, drawing
Drawbot
Repository for DrawBot. The Discord Art bot!
Stars: ✭ 10 (-87.01%)
Mutual labels:  art, drawing
Moebius
Modern ANSI & ASCII Art Editor
Stars: ✭ 138 (+79.22%)
Mutual labels:  art, drawing
Godot Texture Painter
A GPU-accelerated texture painter written in Godot 3.0
Stars: ✭ 155 (+101.3%)
Mutual labels:  art, drawing
grafana-monitoring-art
Grafana Monitoring Art datasource
Stars: ✭ 38 (-50.65%)
Mutual labels:  art
microbium-app
Draw new worlds
Stars: ✭ 89 (+15.58%)
Mutual labels:  art
QuietVR
A Quiet Place in VR: Generate any 3D object with your voice. It's magic!
Stars: ✭ 17 (-77.92%)
Mutual labels:  art
lock-bitmap
A very small class to work with images faster in .net
Stars: ✭ 20 (-74.03%)
Mutual labels:  drawing
nativescript-drawingpad
📝 NativeScript plugin to provide a way to capture any drawing (signatures are a common use case) from the device
Stars: ✭ 89 (+15.58%)
Mutual labels:  drawing
NFT.net
An engine developed with .NET Core to generate NFT's through a graphical interface. Simple as that, in the best Grab & Go style.
Stars: ✭ 294 (+281.82%)
Mutual labels:  art
timelens
Timelens command-line client
Stars: ✭ 39 (-49.35%)
Mutual labels:  art
InfiniteCanvas
Proof of concept for a vector drawing app without canvas boundaries.
Stars: ✭ 106 (+37.66%)
Mutual labels:  drawing

Pub GitHub Release Date GitHub

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:

dependencies:
  rough: <latest_version>

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:

  1. Create a DrawConfig object to determine how your drawing will look.
  2. Create a Filler to be used when drawing objects (you have to provide a configuration for the filling and a DrawConfig for the filling path).
  3. Create a Generator object using the created DrawConfig and Filler. This will define a drawing/filling style.
  4. Invoke the drawing method from the Generator to create a Drawable.
  5. Paint the Drawable in the canvas using the drawRough method extension for Canvas.

Here an example on how to draw a circle:

//Create a `DrawConfig` object.
DrawConfig myDrawConfig = DrawConfig.build(
  roughness: 3,
  curveStepCount: 14,
  maxRandomnessOffset: 3,
);

//Create a `Filler` with a configuration (we reuse the drawConfig in this case).
FillerConfig myFillerConfig = FillerConfig(
    hachureGap: 8,
    hachureAngle: -20,
    drawConfig: myDrawConfig,
);
Filler myFiller = ZigZagFiller(myFillerConfig);

//Create a `Generator` with the created `DrawConfig` and `Filler`
Generator generator = Generator(
  myDrawConfig,
  myFiller,
);

//4. Build a circle `Drawable`.
Drawable figure = generator.circle(200, 200, 320);

//5. Paint the `Drawable` in the canvas.
Canvas.drawRough(figure, pathPaint, fillPaint);

And this is the result:

Result

Both DrawConfig and FillerConfig will use default values for anything not specified.

Samples

Some screenshots of the example app:

Example 1 Example 2 Example 3 Example 4

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].