over 10 years ago
Get the ink flowing w/ these tips from the WILL developer team
Hey, inkovators! Now that the hackathon is under way, we want to make sure you have all the resources necessary to get your digital quills and blotters primed and ready.
Here are a few tech tips the WILL team passed along to get you started.
Can I render text along with the ink?
Yes, WILL is designed to work in conjunction with other rendering engines, like font type renderers or general 2D graphics libraries.
Can I import images to the canvas?
Yes, images can be imported to the WILL canvas as OpenGL/DirectX/WebGL textures.
Which file formats are supported?
The WILL SDK provides built-in support for .will, the WILL stroke file format.
Why would I use WILL stroke file format instead of InkML or SVG?
WILL is more optimal for handwritten content compared to SVG, and provides uniform graphical representation across devices, unlike InkML.
Can I create my own inking tools?
Yes, inking tools are entirely parametrized, and application developers can design their own tools. Developers can define the width and opacity of the inking tools. The rendering parameters (textures, blend modes, etc.) are also configurable.
How is the inking view represented on different platforms?
The inking view appears in SurfaceView or in TextureView on Android; CAEAGLLayer on iOS; SwapChainPanel on Windows 8; and HTMLCanvas on Web.
Can ink be converted or rendered to bitmap (offscreen)?
The inking can be stored in an OpenGL/DirectX/WebGL texture, from which a bitmap can be created. Also, on the Web, the HTMLCanvas has a built-in functionality to be exported as PNG.
Can WILL convert ink to an SVG or PDF?
Using the class WCMBezierPathUitls on iOS; Module.BezierPath on Web; or BoundaryBuilder on Android, the ink can be converted to a Bezier curves path, describing the boundaries of the ink. With this path, developers can produce SVG or PDF, using a suitable API for their platform.
Can I use HTMLCanvas 2D context with WILL?
No, but it is possible to transfer the content from HTMLCanvas with 2D context into a WILL canvas.
What is ASM.JS and what is it needed for?
WILL core modules are coded in C++ and compiled to ASM.JS (a subset of Javascript) using Emscripten.
What is the file format footprint?
For approximately one hour of handwriting with a solid color ink (9,353 strokes have 194,090 total control points), the file size would be ~1.1 MB.
What is the rendering performance?
For approximately one hour of handwriting with a solid color ink on iPad3 Model MD331FD/A, the performance stats are:
- File size: 1103 KB
- Strokes count: 9353
- Total control points count: 194090
- Total time for loading file and rendering: ~3.595 seconds
- Loading and processing of stroke file format: 1.154 seconds
- Render time only: 2.441 seconds
If you have further questions about file compatibility for your existing application or anything else, please reach out to the WILL team by emailing willdevelopers@wacom.com.
You can also contact the Devpost team any time at support@devpost.com.
