-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Ink support #1477
Comments
We can't copy the .NET Framework Reference Source since it is not correctly licensed. We have to do a clean-room implementation or we can be sued. |
I've been looking through the support for |
@jkoritzinsky For dot net framework it converts the Stylus to geometry and then renders the geometry that we should only render the geometry. |
I was looking at hooking into the OS support so we can get handwriting and shape recognition automatically. We could always just manually capture the input and draw as a first step. Though, I'd definitely prefer eventually adding OS native support. |
@jkoritzinsky I dont think all the os can do it. |
That's all supported within the UWP classes which are also available on Desktop as far as I can tell. They all work through the UWP InkPresenter class (and related classes which rely on data stored in an InkPresenter), which can be hosted in a UWP canvas, a DirectComposition visual, or a Windows.UI.Composition visual: https://docs.microsoft.com/en-us/uwp/api/windows.ui.input.inking.inkpresenter.activatecustomdrying#Windows_UI_Input_Inking_InkPresenter_ActivateCustomDrying. |
@jkoritzinsky Thx for your docs but I mean that some OS like Gentoo cant do it. |
Yeah we'd need to have fallback support for a basic ink canvas without hooking into OS support. |
@jkoritzinsky May we should provide two systems that the one run in win32(win10) use UWP api and another run in other systems render the geometry. |
That works for me! We can push back the Windows 10 based one for a while since we'd need to add native layer (DirectComposition) support into Avalonia, which might take a bit. |
@jkoritzinsky by the way how can we use UWP api in WPF without package to store. |
Some UWP APIs can be used by traditional desktop applications. Docs used to say which ones, but I can't find the support tables in the new docs system. Also, please don't copy the WPF source code. Please do a clean room implementation without looking at their code. If you copy their code we'll have to decline the pull request for legal reasons. We had to do that a while back for some Grid speed improvements. |
@jkoritzinsky Thx. Now I am discussing with my partner to open our code to Avalonia. But I dont think my Ink render scheme is superior. |
Now wpf is open source with MIT license. Can we copy the code from WPF ? @jkoritzinsky |
We have pen and touch input support including pressure and tilt parameters. PointerMoved even has GetIntermediatePoints() information. Saying that, I wouldn't expect specialized Ink Control to be part of the core avalonia framework. |
Great work! Does it work on Android as well as Windows? |
so ,any update for this? |
@AtomKing as written above, this control will most likely not a control that we ship via Avalonia. Either search for a 3rd party control (I've not seen any yet) or develop such a control on your own. |
@AtomKing I am currently returning to this project, where I have recently successfully added touch pressure support for Avalonia, see #15283 and #15297 . The support for touch pressure is a fundamental prerequisite for writing applications. I still believe that the Ink module requires built-in support from the UI framework, as the entire UI framework must be adjusted around the goals of high performance and responsiveness during the implementation of Ink. This will enhance the capabilities of the Avalonia framework, making Avalonia more powerful. I have been working on writing applications for the past decade, especially on large-size touch screen devices. Writing applications encompass a wealth of professional knowledge. I am acutely aware that to create a competent writing application, the support of the UI framework is indispensable. |
I cant find Ink in Avalonia and me working on an Ink app.
I want to add Ink support to Avalonia. At least, copy the dot net framework code to Avalonia.
https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/InkCanvas.cs
The text was updated successfully, but these errors were encountered: