What you’ll study
- The stages a pen stroke goes through, from the sensor to a saved file, each one a guide in this series.
- What the rule “documented APIs and published specs only” lets this guide say, and what it makes it leave out.
- What Apple, Microsoft, Wacom and Samsung publish about each stage, and Android’s own answer beside them.
- Where the platforms agree (more samples than events, and a way to get them), and where one is alone (late values, in Apple’s case).
- What a cross-platform app has to do about units, from the documented ranges.
- What the documentation can’t tell you, and so what a device has to.
How it connects
This is the series on one page. Guide 1 said why naive drawing feels bad, and guide 2 and guide 3 said where the time goes. Guide 4 followed a touch to your app and guide 5 read the event; guide 6 smoothed and predicted it. Guide 7 built the stroke, guide 8 drew it fast, guide 9 erased it, guide 10 shared a board between hands, guide 11 kept it fast and guide 12 saved it. The question here is the one a reader asks after all that: what do the others do?
Read it at your level
| Level | Read | You should be able to |
|---|---|---|
| Student | The basics, the matrix lab | Name the stages a pen stroke goes through, and say what “documented” means in this guide |
| Fresher | + The high level | Say which stages each platform’s documentation answers, and which it doesn’t |
| Junior | + Stage by stage | Name the call each platform has for the samples between events, and for prediction |
| Mid | + Units, the snippet | Normalise pressure from three systems’ documented ranges, and say what you can’t normalise |
| Senior | + Edge cases, cross questions | Say what a vendor’s documentation can and can’t settle, and what you would measure on a device |
The basics
A pen “feels like ink” when three things hold. The line is under the pen tip when the pen gets there (latency). The line has the shape the hand made (fidelity: every sample, with pressure and tilt). And it holds on a fast stroke, where the system has to guess a little ahead (prediction). The series took those apart. Each part is a stage:
| Stage | What happens | Guide |
|---|---|---|
| Sense and sample | The pen is measured, at some rate | 4 |
| What a sample carries | Position, time, pressure, tilt, orientation | 5 |
| Samples between events | Events arrive less often than samples are taken | 5 |
| Values that arrive late | A value reported after its touch | none: the series doesn’t cover it |
| Prediction | A guess of the next samples, replaced by the real ones | 6 |
| Drawing the live stroke | A fast path for the stroke under the pen | 8 |
| Saving | The stroke as bytes | 12 |
This guide asks each vendor’s documentation the same seven questions. It is not a ranking. The answers are what a page said, and the interesting part is often the question a page doesn’t answer.
The rule
The only things that count here are documented APIs (a function, a field, a class a vendor’s documentation names) and published specifications (a figure or range in documentation or in a product’s specification table). A figure from a product page’s marketing copy is labelled as marketing, and a figure that isn’t on a page isn’t given from memory. When a page doesn’t say, the matrix says not on the pages read. That means exactly what it says: it is not a claim that the platform can’t do it. Samsung is the case where this matters most.
Try it: the matrix lab
Pick a question. Each card is one platform’s answer, with its kind (an API or field, a figure or range, a vendor product page, or “not on the pages read”), a short quote where there is one, and the pages it came from, which you can open. Dashed cards are the ones the pages didn’t answer. The line at the bottom counts how many of the seven questions each platform’s pages answered.
Things to try. The lab starts on What a sample carries with All five showing.
- The count. Under the cards: Android 6 of 7, Apple 7 of 7, Microsoft 4 of 7, Wacom 3 of 7, Samsung 0 of 7. Read those as “found on the pages I read”, and not as a score. I read Android’s pages because they are this series’ subject, and Samsung’s developer pages are about a different thing, S Pen Remote.
- Three scales for pressure. What a sample carries: Android says 0 to 1 (and that higher values are possible), Microsoft says 0 to 1024, and Wacom’s Wintab reports the range of the device through a call and gives no figure on the pages read. Apple names force and gives no range on the page read.
- Only Apple has late values. Choose Values that arrive late, then Only where documented: one card, Apple’s. The pencil is a separate device, so force, azimuth and altitude may be estimates first and the real values come later.
- Prediction, three ways. Choose Prediction. Android and Apple both say to treat predicted samples as temporary: replace them with the real ones. Microsoft’s pointer structure has a predicted location, and for a pen it is the same as the raw one.
- Where the sampling rate is. Choose How often it is sampled. Apple says up to 240 Hz and that UIKit delivers about 60 Hz. Android gives a range, 60 to 1,000 Hz, for touch hardware in general. Wacom’s pages have fields for the rate and no value, and a product page that says “high report rate” without a number.
- Samsung. Choose any question with Only where documented on: Samsung is missing from every one. Its pages are about what the S Pen can do as a remote control. [note] The pen’s drawing data comes through Android: that is the author’s inference, and not something Samsung’s pages say.
The lab is a table with links; there is nothing in it to run, and nothing was measured on a device.
The high level
| Stage | Android | Apple | Microsoft | Wacom | Samsung |
|---|---|---|---|---|---|
| What a sample carries | Ranges | Azimuth, altitude, force | Ranges | Packet fields | Not found |
| How often it is sampled | A range, 60 to 1,000 Hz | Up to 240 Hz | Not found | Fields, no value | Not found |
| Samples between events | Batching, unbuffered dispatch | Coalesced touches | Pointer history | Packet queue | Not found |
| Values that arrive late | Not found | Estimated properties | Not found | Not found | Not found |
| Prediction | MotionEventPredictor |
Predicted touches | None for pens | Not found | Not found |
| Drawing the live stroke | Front buffer | Claimed, how not said | Wet ink on a background thread | Not found | Not found |
| Saving | Gzipped protobuf | PKDrawing data |
Not found | Not found | Not found |
Stage by stage
Quotes are short, from the pages linked in the lab and in The map; lines marked [note] are the author’s.
1. What a sample carries
Android gives pressure “between 0 (no pressure) and 1, but higher values can be returned” (depending on the screen calibration), and for a stylus an orientation of “0 to pi (𝛑) clockwise or 0 to -pi counterclockwise”, a tilt angle in radians, and a distance from the screen for hover. Microsoft’s POINTER_PEN_INFO has pressure from 0 to 1024, rotation from 0 to 359, and tiltX and tiltY from −90 to +90, with the barrel, inverted and eraser states in pen flags; the page calls tilt an angle and doesn’t name the unit. Apple says a touch from Apple Pencil carries the pencil’s azimuth and altitude and the force recorded at its tip. Wacom’s Wintab packet holds x, y, z, normal and tangent pressure, orientation (azimuth, altitude, twist) and rotation, and WTInfo returns the pressure range of the device. Wacom’s Intuos Pro page lists 8,192 pen pressure levels and ±60 degrees of tilt, as rows of its specification table: they are the manufacturer’s figures for one product, not part of the API. Samsung’s pages that were read say nothing on the subject.
2. How often
Apple: “Devices that work with Apple Pencil can report touches at up to 240 Hz”, while UIKit usually reports at around 60 Hz. Android’s stylus page puts touch sampling in a range of 60 to 1,000 Hz, a statement about hardware in general. Microsoft’s pages that were read have no rate. Wintab has fields for it (DVC_PKTRATE, “the maximum packet report rate in Hertz”) and the pages read give no value. [note] Guide 4’s point stands: the rate a pen is sampled at and the rate an app sees events are different numbers, and these pages mostly give the first, or neither.
3. Samples between events
Every platform that answered has the same problem and a different name for the answer. Android batches motion events, and requestUnbufferedDispatch() asks the input system to deliver them “as soon as they’re available” (guide 5 has the history samples). Apple’s coalescedTouches(for:) returns “all of the touches associated with the specified main touch”, since the last event, and warns not to mix them with the touches passed to the responder. Microsoft’s GetPointerPenInfoHistory returns the inputs “coalesced into the current message”, most recent first, and the data may be gone after the thread’s next message. Wintab keeps a packet queue, and WTPacketsGet copies the next packets out of it. In all four a drawing app wants the extra samples, and in all four they are opt-in.
4. Values that arrive late
Apple’s pages say the pencil “is a separate device”, so there is a delay between the pencil gathering altitude, azimuth and force and those values reaching the app; UIKit may give estimates first and the real values later. estimatedProperties says which values are estimates, estimationUpdateIndex identifies the touch, and touchesEstimatedPropertiesUpdated delivers the real values. The page says that an app using those values “must explicitly handle estimated properties”. None of the other platforms’ pages that were read describes this. [note] That doesn’t mean their pens deliver every value on time, only that the pages don’t say.
5. Prediction
Android’s MotionEventPredictor (androidx.input:input-motionprediction) has record() and predict(), and the page says predicted data “must be replaced with actual MotionEvent data once it is received”. Apple’s predictedTouches(for:) returns where the system expects the touch to go; the page says to append them “only temporarily” and to discard them “as soon as you receive a new event”. That is the same rule as guide 6’s. Microsoft’s POINTER_INFO has a predicted pixel location, but for pens “the predicted value will be the same as the non-predicted value”: the documented answer is no prediction there. No prediction was found in the Windows Ink pages read, in Wacom’s or in Samsung’s.
6. Drawing the stroke being written
Android’s stylus page describes the low-latency library as avoiding multi-buffer rendering and “leveraging a front-buffer rendering technique, which means writing directly to the screen”, from Android 10; the Ink API uses it (guide 8). Microsoft documents the same split as wet and dry ink: by default InkPresenter processes ink “on a low-latency background thread and rendered ‘wet’”, and on completion processes it on the UI thread and renders it dry; InkSynchronizer (BeginDry, EndDry) lets an app do the drying. Apple’s PencilKit page says its canvas “supports the low-latency capture of touches”; the pages read don’t say how. Wacom’s and Samsung’s pages that were read don’t cover it. Of the two that explain a mechanism, both use a fast path separate from the normal frame, which is guide 8’s two-surface idea.
7. Saving
Android’s Ink storage saves a brush family and a batch of samples as gzip-compressed binary protobuf (guide 12). Apple’s PKDrawing holds the strokes; each PKStrokePoint has a location, a time offset, a size, an opacity, force, azimuth and altitude, and dataRepresentation() and init(data:) save and load it; the byte format isn’t on the pages read. [note] The point’s properties are close to what guide 12’s save lab writes, with size and opacity added. Microsoft’s Ink Serialized Format specification page that was tried returned 404, so nothing is claimed about it. Wacom’s and Samsung’s pages don’t cover saving.
Units, and the snippet
A board that takes pens from several systems (guide 10, guide 12’s sharing) has to convert, and the only conversions it can do honestly are the ones with a documented range:
data class PenSample(
val x: Float,
val y: Float,
val timeMs: Long,
/** 0 (no pressure) to 1 */
val pressure: Float,
val tiltRadians: Float,
val orientationRadians: Float,
)
/** Android documents pressure as 0 to 1, though "higher values can be returned", so clamp. */
fun androidSample(event: MotionEvent, pointer: Int): PenSample = PenSample(
x = event.getX(pointer),
y = event.getY(pointer),
timeMs = event.eventTime,
pressure = event.getPressure(pointer).coerceIn(0f, 1f),
tiltRadians = event.getAxisValue(MotionEvent.AXIS_TILT, pointer),
orientationRadians = event.getOrientation(pointer),
)
/** Windows documents `POINTER_PEN_INFO.pressure` as normalised to 0 to 1024. */
fun fromWindowsPressure(raw: Int): Float = (raw / 1024f).coerceIn(0f, 1f)
/** Wintab reports the pressure range of the device through `WTInfo` as an axis with a minimum and a maximum. */
fun fromWintabPressure(raw: Int, axisMin: Int, axisMax: Int): Float =
if (axisMax > axisMin) ((raw - axisMin).toFloat() / (axisMax - axisMin)).coerceIn(0f, 1f) else 0f
Apple’s force has no function here because the page read gives no range for it, and a tilt from Windows has none because the page gives a range and not a unit. Both are things to look up before converting, not to guess. The sample’s time is the event time, in milliseconds, so it is coarser than the sample times of guide 12’s lab.
Checkpoint
You should be able to say:
- A pen’s stroke goes through seven stages in this series, from the sample to the file.
- Every platform whose pages answered has a way to get the samples between events: batching and unbuffered dispatch, coalesced touches, pointer history, a packet queue.
- Only Apple’s pages describe values that arrive after their touch.
- Android and Apple both say predicted samples are temporary and replaced; Microsoft’s pointer structure gives pens no prediction.
- Android and Microsoft document a fast path for the live stroke, front-buffer rendering and wet ink; Apple claims low latency and doesn’t say how.
- Pressure is on different scales in different systems, and the documented ranges let you convert only some.
- A page that doesn’t say is not a proof that the platform can’t.
Why it helps
| Symptom | What is happening | What to do |
|---|---|---|
| A port from another platform feels laggy | The other platform’s fast path doesn’t exist here | Find this platform’s own: front-buffer rendering on Android |
| Strokes look coarse on a fast pen | Only the delivered events are used | Ask for the extra samples: history on Android, coalesced touches on Apple |
| The tip of the stroke jumps back | Predicted samples were kept | Replace predictions with the real samples on every event |
| Pressure is flat or saturates on one device | The device’s range isn’t what the code assumes | Convert from the range the system documents, and test the device |
| A pen value changes after the stroke started | Apple’s estimated properties (or something undocumented) | Keep samples with an update key, and handle the later values |
| The vendor’s number isn’t on the device | A marketing or specification figure, not an API | Measure on the device; don’t build on the figure |
The map
| Topic | Code | Where |
|---|---|---|
| Pen data, batching, prediction, front buffer (Android) | MotionEvent, MotionEventPredictor, the low-latency library |
Android stylus input: advanced features |
| The Ink API | Jetpack Ink | About the Ink API |
| Apple Pencil input | Estimated properties, 240 Hz | Handling input from Apple Pencil |
| Apple’s extra and predicted samples | coalescedTouches(for:), predictedTouches(for:) |
coalescedTouches, predictedTouches |
| Apple’s drawing types | PKCanvasView, PKDrawing, PKStrokePoint |
PKDrawing, PKStrokePoint |
| Microsoft’s pen fields | POINTER_PEN_INFO, POINTER_INFO |
POINTER_PEN_INFO, POINTER_INFO |
| Microsoft’s history | GetPointerPenInfoHistory |
GetPointerPenInfoHistory |
| Microsoft’s wet and dry ink | InkPresenter, InkSynchronizer |
InkPresenter |
| Wacom’s pen packets | Wintab PACKET, WTPacketsGet, WTInfo |
Wintab reference |
| Wacom’s product figures | The specification table | Intuos Pro |
| Samsung’s S Pen developer pages | S Pen Remote SDK, Air Actions | S Pen Remote SDK |
Edge cases
- Documentation moves. These pages were read on 17 November 2026. A function that isn’t on a page today can be tomorrow, and a page can change what it says.
- Samsung’s pens draw through Android. The pages read describe S Pen Remote, which is button presses and air motion, and say nothing about drawing. That doesn’t say the drawing path isn’t Android’s; it says Samsung doesn’t document it there.
- A specification row isn’t an API. Wacom’s 8,192 levels and ±60 degrees describe a product, and what a driver delivers to an app is a separate thing, the range
WTInforeports. - Apple’s frame rate and its sample rate. 240 Hz is the touch rate of devices that work with the pencil, and 60 Hz is what UIKit usually delivers. Coalesced touches are the way to the difference.
- Not read. Microsoft’s ISF specification (the page tried returned 404), Apple’s PencilKit rendering internals, how Wacom’s drivers deliver to Android or Windows Ink, and anything on Samsung’s consumer and support pages. They may answer questions this guide leaves empty.
- The counts are about what was read. A platform with more cells filled had more of its pages read, and the series’ own platform got the most.
Cross questions
Why doesn't this guide say which platform has the lowest latency?
Because no page read gives a figure that can be compared: the documentation describes mechanisms (a front buffer, a background thread, a claim of low latency) and the one numeric statement about responsiveness that turned up was marketing copy without a number. A latency comparison needs measurements on devices, which this guide didn't make.
Why is Samsung empty?
The Samsung developer pages that were read cover the S Pen Remote SDK: button events, air gestures and motion coordinates. Nothing there is about drawing, so the Samsung cards say they aren't on the pages read, and the drawing path for a Galaxy device is Android's, which Samsung's pages don't state.
Does "not on the pages read" mean the platform can't do it?
No. It means the pages I opened didn't say. Android may deliver late values somewhere, and Microsoft may document prediction elsewhere. The matrix is a record of what was found, with the pages, so a reader can look further.
Why only Apple for late values?
Its documentation says why: the pencil is a separate device, so some properties reach the app after the touch. Whether another pen has the same gap depends on its hardware, and the pages read for the others don't describe one.
What would I check on a device?
The sampling rate you actually receive, the batching you get without the history calls, the range of pressure the device reports, whether the fast path is taken, and what a predicted sample does at the end of a stroke. Those are the things a page can describe and a device has to confirm.
Is a Wacom tablet the same thing as a Wacom pen on a phone?
Wacom's developer pages list separate routes: Wintab on Windows, the Microsoft Ink APIs, and for Android the standard motion events, which Wacom's page quotes from Android's documentation. The matrix reads Wintab for the packet fields because that is the Wacom API described on the pages read.
Revision: key points
- The series’ stages: sample, what it carries, samples between events, late values, prediction, the live stroke, saving.
- Only documented APIs and published specifications count; marketing is marked, and a page that doesn’t say is “not on the pages read”.
- Every platform that answered has an opt-in way to get the samples between events.
- Apple alone documents values that arrive late: estimated properties and their updates.
- Android and Apple say to treat predicted samples as temporary; Microsoft documents no pen prediction in its pointer structure.
- Android (front buffer) and Microsoft (wet ink on a background thread) document a separate fast path for the live stroke.
- Pressure is 0 to 1 on Android, 0 to 1024 in Windows pen info, and a device-reported range in Wintab.
- Samsung’s developer pages that were read are about S Pen Remote, not about drawing.
Cheat sheet
Each concept in a few words.
| Concept | In a few words |
|---|---|
| Coalesced touches | Apple’s extra samples between delivered events. |
| Pointer history | Windows’ calls for the inputs folded into one message. |
| Packet queue | Wintab’s queue of pen packets that the app reads out. |
| Estimated properties | Apple Pencil values sent first as guesses, corrected later. |
| Predicted samples | Guessed next points: draw them temporarily, then replace. |
| Wet ink | The live stroke, drawn on a fast path. |
| Front-buffer rendering | Android’s way of writing the live stroke straight to the screen. |
| Report rate | How many pen samples a second the device sends. |
| Specification row | A product’s stated figure; not what an API delivers. |
| Not on the pages read | The pages didn’t say. It doesn’t mean it can’t be done. |
Read next
- The pages: the links in The map, each opened on 17 November 2026
- The series: guide 5 for the event, guide 6 for prediction, guide 8 for the fast path and guide 12 for saving
- Where real software uses this: PencilKit apps, Windows Ink apps, Wacom drivers and Android drawing apps, which is every drawing app; the matrix is a map of what the vendors say, not of any one product
Search terms that find more: UITouch coalescedTouches estimatedProperties, GetPointerPenInfoHistory, InkPresenter wet ink InkSynchronizer, Wintab WTPacketsGet, MotionEventPredictor, S Pen Remote SDK, Android low latency graphics front buffer.
The fine print
Every claim here comes from a page opened on 17 November 2026: Apple’s from its documentation, Microsoft’s from learn.microsoft.com, Wacom’s from its developer documentation and one product page, Samsung’s from its developer site, and Android’s from developer.android.com. Several pages were first read by a fetch tool, and every quote and field name used was then checked against the page text directly; Wacom’s product page, which is rendered by a script, was read in a browser. Apple’s pages were read from the same JSON that their site serves. Pages that were not read, or returned errors, are listed under Edge cases and in the matrix as not on the pages read. The Kotlin snippet compiles against Android’s SDK at minSdk 26 and lint had nothing to report on it; it was not run on a device, and nothing in this guide was. The matrix lab is data and links; its tests check that every cell has an https source and a short quote, and pin the counts above. No latency, sampling or pressure figure was measured, and no figure is quoted that is not on a page. The page was checked in the built-in browser pane in dark theme; light theme, narrow widths and a phone were not checked.
Part of the ink series: 1. Why naive drawing feels bad, 2. Canvas, Paint and Path, 3. Looper, epoll and vsync, 4. From glass to your app, 5. Reading a MotionEvent, 6. Smoothing and predicting the pen, 7. From points to a stroke mesh, 8. Drawing with low latency, 9. The eraser, 10. Many hands on one board, 11. Big boards, slow GPUs, 12. Saving and sharing strokes.