Skip to content

Latest commit

Β 

History

History
78 lines (62 loc) Β· 2.59 KB

File metadata and controls

78 lines (62 loc) Β· 2.59 KB

Ink

The Ink library is a freehand stroke generation library. It produces smoothed, modeled stroke shapes with brush effect shaders as mesh-based vector graphics.

This provides the core of the implementation of the Android Jetpack Ink library. While the implementation is well-tested, the developers of this library are not currently making hard guarantees about interface stability.

How to Build and Test

Bazel

Prerequisites:

Ink can be built and tested from the repo root:

bazel test --config=linux ink/...

Library Structure

Ink consists of a set of modules that can be used separately. You should only need to include the parts of the library that you need. The basic dependency structure is:

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”
 β”‚Rendering β”‚ β”‚Storageβ”‚
 β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”¬β”€β”€β”€β”€β”˜
      β”‚          β”‚
      β–Ό          β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”     β”‚
   β”‚Strokesβ”‚β—„β”€β”€β”€β”€β”˜
   β””β”€β”€β”€β”¬β”€β”€β”€β”˜
       β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”
   | Brush |
   β””β”€β”¬β”€β”€β”€β”€β”¬β”˜
     β”‚    β”‚
     β”‚    β–Ό
     β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚ β”‚Geometryβ”‚
     β”‚ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜
     β”‚     β”‚
     β–Ό     β–Ό
 β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”
 β”‚Colorβ”‚ β”‚Typesβ”‚
 β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜
  • color: Color spaces, encoding, and format conversion.
  • types: Utility types; time, units, constants, small arrays.
  • geometry: Geometric types (point, segment, triangle, rect, quad), meshes, transforms, utility functions, and algorithms (intersection, envelope).
  • brush: Defines stroke styles and behaviors.
  • strokes: The primary Stroke data type and InProgressStroke builder.
  • rendering: Rendering utilities for strokes. Currently only has support for android.graphics.Mesh based rendering.
  • storage: Protobuf serialization utilities for Stroke and related types.

Contributing

See CONTRIBUTING.md for details on sending a PR.

Contact

Use GitHub Issues to file feedback: https://github.com/google/ink/issues