Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
GerryButton committed May 27, 2020
1 parent 2f547b9 commit 81be932
Show file tree
Hide file tree
Showing 215 changed files with 106,305 additions and 1 deletion.
93 changes: 93 additions & 0 deletions GETTING-STARTED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Getting Started

## Windows 10 UWP Development Environment

The WILL SDK for Ink requires Windows 10 with Visual Studio 2017 or above.
Tutorial samples have been provided for the Universal Windows Platform (UWP).

## Download the SDK

Download the SDK from https://developer.wacom.com/developer-dashboard

* Login using your Wacom ID
* Select **Downloads for ink**
* Download **WILL SDK for Windows 10 (UWP)**
* Accept the End User License Agreement to use the SDK

The downloaded Zip file contains the SDK with documentation.


## SDK License

The SDK is free of charge and does not need a license.

## Using the WILL SDK

To use the SDK first install the Visual Studio .vsix extension:

Sdk\Will.Ink.vsix

Double-click in File Explorer and follow the installation instructions.


## Tutorials

Tutorials demonstrate how to use WILL SDK in Windows Store applications.
The tutorials are divided into parts that demonstrate various aspects and features of the SDK.
The following tutorials are provided:

* [Tutorial 1: Drawing with Pointing Devices](Samples/Tutorials/Tutorial_01/README.md)
* [Tutorial 2: Stroke Model and Serialization](Samples/Tutorials/Tutorial_02/README.md)
* [Tutorial 3: Erasing Strokes](Samples/Tutorials/Tutorial_03/README.md)
* [Tutorial 4: Selecting Strokes](Samples/Tutorials/Tutorial_04/README.md)
* [Tutorial 5: Working with Rasters](Samples/Tutorials/Tutorial_05/README.md)
* [Tutorial 6: Pen Id](Samples/Tutorials/Tutorial_06/README.md)

The sample code in the tutorials is written in C#.
Each tutorial has an associated project which can be compiled and run using Visual Studio 2013.

The projects are created with Visual Studio 2013 using the following template in the New Project dialog:

```Templates > Visual C# > Store Apps > Windows Apps > Blank App (Windows)```


## API Reference

In the downloaded SDK open this file in a browser:

`documentation\index.html`

The page gives access to the API Reference section:

![WILL-Ink-API](media/API.png)

---

## Sample Application

Build the supplied project in Visual Studio.
These instructions document one experience using Visual Studio 2017:

* In Visual Studio 2017, Open Solution… Samples\DirectXInterop1.sln
* If prompted, install C++ Universal Windows Platform tools
* If prompted, select 'Retarget Solution' in Solution Explorer and accept the default Windows SDK versions
* Verify the References defined in the project are valid, particularly WILL Ink.
* If the reference to WILL Ink is an older version:
* Remove the existing reference
* Add reference...Universal Windows...Extensions...WILL Ink 2.1
* Select CPU type x64
* Set DirectXInterop1 as the startup project: right-click the project in Solution Explorer ... Set as Startup Project
* Build project
* Run to display the startup window.
* Draw with the mouse to see live rendering:

![WILL-Ink-Sample-Screenshot](media/DirectXInterop1.png)


----





135 changes: 134 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,134 @@
# sdk-for-ink-uwp
# WILL SDK for ink - Windows UWP

WILL (Wacom Ink Layer Language) is a cross-platform universal ink solution.
The WILL SDK for ink is a Software Development Kit (SDK) that allows you to include premium digital inking features in your applications.
Its modularized architecture allows each module to be configured, replaced, or omitted as required by the specific application, providing you with superior flexibility.
You can also use the WILL open file format (.will) to exchange ink content between applications.

The WILL SDK for ink includes:

* A software library
* Code samples illustrating particular functionality
* The Tool Configurator - a fully functional demo application
* Comprehensive documentation, including step-by-step tutorials
* Articles describing advanced programming techniques and best practices

## Digital ink

Digital ink (referred to in this documentation as ink) content comprises of strokes.
These are usually, but not necessarily, created with a pointing device.
Strokes have certain graphical characteristics and can be optionally associated with other data or metadata.
You can digitally store and share ink content using various models - vector-based, pixel-based, or hybrid.

## Ink content exchange

The WILL file format is similar to SVG, but is specifically designed to accommodate digital ink content.
It is used for exchanging ink content between devices and applications, and is implemented as an open and extensible binary format.

Note that the main modules of the WILL software library do not rely on a specific file format.
You can use alternatives to the WILL file format (for example, InkML, SVG, or PNG) to exchange handwritten content, according to specific application requirements.

## Software library

WILL supports a variety of input technologies and generates the best possible ink through the use of two dedicated modules, **Path** and **Smoothing**, that take into account the specific characteristics of each input type.
The Rasterizer module then provides advanced real-time stroke rendering.
The **Manipulation** module supports editing functions that leverage the WILL stroke mathematical model (referred to as the stroke model in this documentation).
The **Serialization** module encodes and decodes stroke data.

![WILL-Ink-Architecture](media/WILLSoftwareLibraryAbstractArchitecture.png)


In more detail:

* The **Path** module converts raw input into the stroke model.
The stroke model is a mathematical model optimized for stroke representation.
It improves on traditional models for 2D graphics: the stroke is represented using Catmull-Rom interpolation over a sequence of control points, but in addition to x and y co-ordinates, each control point can have width and opacity values.

* The **Smoothing** module enhances and enriches the stroke representation.

* The **Rasterizer** module provides APIs that are compatible with the stroke model.
It uses three rendering back-ends that are built on OpenGL ES 2.0, DirectX 11.1, and WebGL respectively, providing full hardware acceleration on most platforms.
The APIs facilitate raster-based techniques such as caching and masking.
These techniques can be used to implement features such as preliminary curves, pixel transformations, and pixel-based manipulations on free-form selections.

* The **Manipulation** module provides a set of algorithms that operate over the stroke model.
These algorithms can be used as building blocks to implement functions such as selecting, erasing, cutting, copying, and pasting.

* The **Serialization** module provides a binary encoding algorithm designed to support the stroke model.
This algorithm is based on Google protocol buffers, which makes the resulting binary code open and platform-independent.

The WILL software library also provides a range of utility algorithms, including:

* An algorithm that calculates the boundaries of strokes described by the stroke model, and represents them as a collection of cubic Bezier curves.
This algorithm can represent strokes using traditional 2D vector graphics models.
The resulting representation can be serialized in traditional vector formats like PDF and SVG, or rendered using traditional 2D graphics libraries like Quartz 2D or Direct2D, or as HTML 5 canvas elements, or Android Canvas instances.

* An algorithm that produces a unique identifier based on the input device.
You can use this functionality, which works exclusively with Wacom devices, to distinguish different users by their pens.


## Platform support

The WILL ink SDK provides platform-specific packages for iOS, Android, Windows Store, and Web.
These packages provide a deep integration with the hosting platform by using native packaging and programming techniques, and by providing platform-specific language bindings for all modules in the software library.

Software applications often combine ink with other content, such as typed text and images.
The platform-specific packages provide the flexibility and extensibility required to tightly integrate WILL with any application.

Platform-specific tutorials illustrate the use of the software library modules.
Source code is provided in each case, and files use a naming convention that reflects the numerical ordering of topics in the Tutorials section of the documentation for each platform.

### iOS

![WILL-Ink-iOS-SDK-Structure](media/iOSSDKStructure.png)

The iOS software library is packaged as a framework, and Objective-C language binding allows iOS developers to use the preferred language of the platform.

### Android

![WILL-Ink-Android-SDK-Structure](media/AndroidSDKStructure.png)

The Android software library is packaged as a native library (shared object) wrapped in an Android library (JAR).
Java language binding allows Android developers to use the preferred language of the platform and easily integrate ink content inside the View hierarchy.

### Windows

![WILL-Ink-Windows-SDK-Structure](media/WindowsSDKStructure.png)

The Windows Store software library is packaged as an unmanaged Windows Runtime Component.
It can be used from any language supported by Windows Runtime (WinRT), whether inside a managed or an unmanaged environment.

### Web

![WILL-Ink-Web-SDK-Structure](media/WebSDKStructure.png)

The Web software library is packaged as a JavaScript module with an asm.js program.
It can be used by any standard HTML 5 application as a regular JavaScript library.

---

# Additional resources

## Sample Code
For further samples check Wacom's Developer additional samples, see [https://github.com/Wacom-Developer](https://github.com/Wacom-Developer)

## Documentation
For further details on using the SDK see [Wacom SDK for ink documentation v2](http://will-docs.westeurope.cloudapp.azure.com/sdk-for-ink/docs/2.0.0/overview)

The API Reference is available directly in the downloaded SDK.

## Support
If you experience issues with the technology components, please see related [FAQs](http://will-docs.westeurope.cloudapp.azure.com/faqs)

For further support file a ticket in our **Developer Support Portal** described here: [Request Support](http://will-docs.westeurope.cloudapp.azure.com/faqs/docs/q-support/support)

## Developer Community
Join our developer community:

- [LinkedIn - Wacom for Developers](https://www.linkedin.com/company/wacom-for-developers/)
- [Twitter - Wacom for Developers](https://twitter.com/Wacomdevelopers)

## License
This sample code is licensed under the [MIT License](https://choosealicense.com/licenses/mit/)

---
11 changes: 11 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SDK for ink - Windows UWP

## Version 2.0.1

## History

### 2.0.1 05 March 2018
* General performance enhancements

### 2.0.0 30 May 2016
* Initial public release
8 changes: 8 additions & 0 deletions Samples/DirectXInterop1/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Application
x:Class="DirectXInterop1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:DirectXInterop1"
RequestedTheme="Light">

</Application>
92 changes: 92 additions & 0 deletions Samples/DirectXInterop1/App.xaml.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
//
// App.xaml.cpp
// Implementation of the App class.
//

#include "pch.h"
#include "DirectXPage.xaml.h"

using namespace DirectXInterop1;

using namespace Platform;
using namespace Windows::ApplicationModel;
using namespace Windows::ApplicationModel::Activation;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Windows::Storage;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Controls::Primitives;
using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Interop;
using namespace Windows::UI::Xaml::Media;
using namespace Windows::UI::Xaml::Navigation;
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
App::App()
{
InitializeComponent();
Suspending += ref new SuspendingEventHandler(this, &App::OnSuspending);
Resuming += ref new EventHandler<Object^>(this, &App::OnResuming);
}

/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used when the application is launched to open a specific file, to display
/// search results, and so forth.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e)
{
#if _DEBUG
if (IsDebuggerPresent())
{
DebugSettings->EnableFrameRateCounter = true;
}
#endif

if (m_directXPage == nullptr)
{
m_directXPage = ref new DirectXPage();
}

if (e->PreviousExecutionState == ApplicationExecutionState::Terminated)
{
m_directXPage->LoadInternalState(ApplicationData::Current->LocalSettings->Values);
}

// Place the page in the current window and ensure that it is active.
Window::Current->Content = m_directXPage;
Window::Current->Activate();
}

/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
void App::OnSuspending(Object^ sender, SuspendingEventArgs^ e)
{
(void) sender; // Unused parameter
(void) e; // Unused parameter

m_directXPage->SaveInternalState(ApplicationData::Current->LocalSettings->Values);
}

/// <summary>
/// Invoked when application execution is being resumed.
/// </summary>
/// <param name="sender">The source of the resume request.</param>
/// <param name="args">Details about the resume request.</param>
void App::OnResuming(Object ^sender, Object ^args)
{
(void) sender; // Unused parameter
(void) args; // Unused parameter

m_directXPage->LoadInternalState(ApplicationData::Current->LocalSettings->Values);
}
27 changes: 27 additions & 0 deletions Samples/DirectXInterop1/App.xaml.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// App.xaml.h
// Declaration of the App class.
//

#pragma once

#include "App.g.h"
#include "DirectXPage.xaml.h"

namespace DirectXInterop1
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
ref class App sealed
{
public:
App();
virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override;

private:
void OnSuspending(Platform::Object^ sender, Windows::ApplicationModel::SuspendingEventArgs^ e);
void OnResuming(Platform::Object ^sender, Platform::Object ^args);
DirectXPage^ m_directXPage;
};
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Samples/DirectXInterop1/Assets/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 81be932

Please sign in to comment.