Skip to content

Repository files navigation

Reihitsu 灵笔

Reihitsu logo

Flutter Dart License

A cross-platform hand-drawn style illustration assistant. Reihitsu helps artists quickly build human figures, add clothing, adjust poses, and refine facial expressions — all from a single Flutter codebase.

  • Author: Yukino_fox
  • Platforms: Windows, macOS, Linux, iOS, Android, Web, HarmonyOS
  • Tech stack: Flutter (Dart) frontend, perfect_freehand for stroke rendering

Demo

Features

Figure Construction

  • Body templates — place a pre-built human, furry, or chibi rig with one click.
  • Body metrics mode — enter height, weight, waist, hip, bust, leg/shoulder ratios and gender to generate a matching skeleton and contour.
  • Body type system — switch between normal, chibi, loli, and furry body types; each type has its own warning ranges and skeleton proportions.
  • Freehand skeleton drawing — sketch a stick figure and the app automatically estimates body proportions and infers the body type.
  • Skeleton overlay — draggable joints, active-joint highlight, and bone visualization.

Clothing & Folds

  • Clothing library — 13 built-in parts across 6 kinds: sleeves, skirts, collars, torso, pants, and shoes.
  • Real-time region detection — draw closed clothing shapes and convert them into editable pieces.
  • Layer panel — activate, lock, and delete individual clothing layers independently.
  • Fold generation — gravity-based geometric fold lines with adjustable count, amplitude, and direction.
  • Fabric types — cotton, silk, denim, wool, knit, satin influence fold characteristics.

Drawing & Rendering

  • Pressure-sensitive brushes — pencil, marker, eraser with stylus pressure or velocity-simulated pressure.
  • Smooth strokes — Catmull-Rom splines with variable-width ribbon rendering via perfect_freehand.
  • Hand-drawn texture — edge jitter and stipple grain for a natural pencil look.
  • Seamless gap closing — fuse nearby stroke endpoints and resample sparse strokes.
  • PNG export — alpha-preserving offscreen rasterization.

Pose, Lighting & Face

  • 2-bone inverse kinematics — drag wrists/ankles while preserving bone lengths.
  • Pose presets — T-Pose, A-Pose, Standing, Sitting, Running, Waving.
  • Left/right mirroring — mirror individual joints or whole sides across the spine.
  • Perspective grid — 1-point and 2-point construction grids.
  • Lighting & shadows — directional light sources, edge shading, and soft drop shadows.
  • Facial expression editor — 14 draggable feature points with 6 expression presets.
  • Face correction — symmetry, eye-spacing, and mouth-width constraints.
  • Face auto-placement — features align to the head's orientation automatically.

App Experience

  • Internationalization — Chinese and English UI, applied in real time without restart.
  • Settings — theme and language persistence via shared_preferences.
  • Project management — create, rename, delete, and save artworks with thumbnails.
  • Onboarding tutorial — 6-step interactive tutorial with skip option for new projects.

Getting Started

Prerequisites

  • Flutter SDK 3.44.6 or compatible
  • Dart SDK ^3.12.2 (bundled with Flutter)
  • A supported IDE (VS Code, Android Studio, etc.)

Install dependencies

flutter pub get

Run the app

# Desktop
flutter run -d linux
flutter run -d windows
flutter run -d macos

# Mobile / Web
flutter run -d android
flutter run -d ios
flutter run -d chrome

Run tests

flutter test

Format and analyze

dart format .
flutter analyze --no-pub

Project Structure

lib/
  brush/                  # Stroke models, brush rendering, texture, gap closing
  canvas/                 # Drawing canvas, controllers, overlay painters
  clothing/               # Clothing pieces, layers, folds, deformation, tracking
  editor/                 # Main editor screen
  export/                 # PNG exporter
  face/                   # Face features, expression, correction, detection
  home/                   # Project gallery / home page
  l10n/                   # Internationalization strings
  lighting/               # Light sources, shadows, edge shading
  pose/                   # IK, pose presets, mirroring
  projects/               # Project data and persistence
  settings/               # Theme/language settings controller and screen
  skeleton/               # Skeleton data, body templates, metrics, detectors
  tutorial/               # Onboarding tutorial overlay
  main.dart               # App entry point
test/                     # Unit and widget tests

Supported Platforms

Platform Status
Android
iOS
Windows
macOS
Linux
Web
HarmonyOS 🚧 (see harmonyos/)

Roadmap

  1. ✅ Body templates & freehand recognition
  2. ✅ Clothing design & layers
  3. ✅ Brush system & texture
  4. ✅ Perspective & pose correction
  5. ✅ Fold generation
  6. ✅ Lighting & shading
  7. ✅ Hand-drawn texture rendering
  8. ✅ Seamless fixes
  9. ✅ Facial expression editor
  10. ✅ Facial intelligent correction
  11. ✅ Face shape detection & placement
  12. ✅ Body metrics & body type inference
  13. ✅ Internationalization

Contributing

Contributions, issues, and feature requests are welcome. Feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Author

  • Yukino_fox — Project author and maintainer

About

灵笔

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages