Zooming and scrolling
This page explains how zooming and scrolling can be managed via the Renderer object of iink SDK.
View transformation matrix
Although interactive ink is digital by essence, handwriting itself has its roots in the physical world. A user feels comfortable when writing with a certain line spacing and will write differently depending on the type and quality of its stylus. Similarly the recognition engine will not interpret the same way an ink circle, if it is almost undistinguishable from a dot or if it one centimeter wide. True to this anchoring in the physical world, iink SDK internally stores its data in millimeters.
Your application, however, will most likely work in view coordinates, and this is the unit you will rely on to dispatch input to the SDK. As you may also specify a zoom factor, things are likely to get complicated.
View size
The size of the view plays an important role to enable interactive content to dynamically reflow and adjust to the view size.
Zoom and scroll management
Zooming and scrolling are managed by acting on the view transformation matrix. Rather than manipulating it directly, however, a set of convenience methods are provided on the renderer object.
Zooming
For example:
Scrolling
For example:
The next part of the step-by-step guide will show how you can style your content.