The Ink library is a freehand stroke generation library. It produces smoothed, modeled stroke shapes with brush effect shaders as mesh-based vector graphics.
- Bazel 7: https://bazel.build/install
- Android NDK: https://developer.android.com/ndk/downloads
- Download and set
ANDROID_NDK_HOME
to point to it. - Alternately use
sdkmanager
or Android Studio: https://developer.android.com/studio/projects/install-ndk
- Download and set
- You may need to install libtinfo for clang
sudo apt-get install libtinfo5
Ink can be built and tested from the repo root:
bazel test --config=linux ink/...
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.
┌──────────┐ ┌───────┐
│Rendering │ │Storage│
└────┬─────┘ └──┬────┘
│ │
▼ │
┌───────┐ │
│Strokes│◄────┘
└─┬────┬┘
│ │
│ ▼
│ ┌────────┐
│ │Geometry│
│ └───┬────┘
│ │
▼ ▼
┌─────┐ ┌─────┐
│Color│ │Types│
└─────┘ └─────┘
color
: color spaces, encoding, and format conversion.types
: utility types; time, units, constants, small arrays, URIs.geometry
: geometric types (point, segment, triangle, rect, quad), meshes, transforms, utility functons, and algorithms (intersection, envelope).strokes
: the primaryStroke
data type andInProgressStroke
builder.rendering
: rendering utilities for strokes. Currently only has support for android.graphics.Mesh based rendering.storage
: Protobuf serialization utilities forStroke
and related types.
See CONTRIBUTING.md for details on sending a PR.
Use GitHub Issues to file feedback: https://github.com/google/ink/issues