aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Freilich <sfreilich@google.com>2022-03-23 11:27:35 -0700
committerCopybara-Service <copybara-worker@google.com>2022-03-23 11:28:00 -0700
commit7fb98041420105ea9238df68d8ecc252d9439455 (patch)
tree4486d415034e583c2efe2e50d170624e96f5f4bf
parent0a7834f117ae624c25af269aec20fdc7ddf738da (diff)
downloadink-stroke-modeler-7fb98041420105ea9238df68d8ecc252d9439455.tar.gz
Add a little more detail about the structure of inputs to README
In particular, note that StrokeModeler doesn't do palm rejection or separate inputs into multiple simultaneous strokes. PiperOrigin-RevId: 436788494
-rw-r--r--README.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/README.md b/README.md
index 03b902a..4823b96 100644
--- a/README.md
+++ b/README.md
@@ -171,7 +171,15 @@ if (status.ok()) {
`Input`s are expected to come in a *stream*, starting with a `kDown` event,
followed by zero or more `kMove` events, and ending with a `kUp` event. If the
modeler is given out-of-order inputs or duplicate inputs, it will return
-`absl::InvalidArgumentError`.
+`absl::InvalidArgumentError`. `Input.time` may not be before the `time` of the
+previous input.
+
+`Input`s are expected to come from a single stroke produced with an input
+device. Extraneous inputs, like touches with the palm of the hand in
+touch-screen stylus input, should be filtered before passing the correct input
+events to `Update`. If the input device allows for multiple strokes at once (for
+example, drawing with two fingers simultaneously), the inputs for each stroke
+must be passed to separate `StrokeModler` instances.
The `time` values of the returned `Result` objects start at the `time` of the
first input and end either at the time of the last `Input` (for in-progress