Associate versions to features in BrushFamily proto. Add descriptors to associate ink.proto.Version values with messages, fields, and enum types in BrushFamily proto. This will be used in a future CL to write consistency tests to ensure all features have a minimum compatible version associated with them. `transitive_descriptor_set` and `options_cc_proto` will be used in a future CL. Version `1.0.0` (stable 1) is being used to represent all the features that were available when Ink `1.0.0` was released (TODO: I think I have this right here, but where can I find the last commit on the C++ side that was included to confirm this?). Everything else is being lumped under the (presumed) next release of Ink, Version `1.1.0-alpha01` (if features get cut or pushed off, we can change them). We don't necessarily need this split, as there is no release of Ink which has versioning set with a maximum allowed version of `1.0.0`, so the actual `1.0.0` release will not reject brushes from `1.1.0-alpha01`. But, this distinction in the code now has been useful for testing purposes. PiperOrigin-RevId: 872916637
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 library provides the core of the implementation of the Android Jetpack Ink module, which is currently in alpha. While the implementation is well-tested, the developers of this library are not currently making hard guarantees about interface stability. We probably will attempt to introduce a versioned release process after the Jetpack module stable release.
ANDROID_NDK_HOME to point to it.sdkmanager or Android Studio: https://developer.android.com/studio/projects/install-ndksudo apt-get install libtinfo5Ink 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.geometry: geometric types (point, segment, triangle, rect, quad), meshes, transforms, utility functions, and algorithms (intersection, envelope).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.See CONTRIBUTING.md for details on sending a PR.
Use GitHub Issues to file feedback: https://github.com/google/ink/issues