This PR ports all the `ICanvasImageInterop` features and other new APIs from the UWP branch to the WASDK branch. The original PRs into the UWP branch are mostly unchanged, minus some tweaks here and there mostly around marshalling and some project file adjustments to make things work.
Included cherry-picked PRs:
- !23226
- !23817
- !23654
- !23663
- !24053
- !23861
Updates all the package references to upgrade Reunion -> WindowsAppSdk 1.0 experimental.
Some of the tests needed fixes because WindowsAppSdk added a namespace called Microsoft.Windows. Because of the way the tests are using namespaces, all their references to Windows.UI.Foo auto-resolved to Microsoft.Windows.UI.Foo which breaks.
- .Net5 projections added
- Updated to reflect WinUI3 changes
- Samples will now live in the Win2D-samples repo
- CanvasAnimatedControl and CanvasBitmap not yet supported
* Use latest installed Windows SDK version
* Use VS2019 (v142) C++ toolchain
* Use UniversalApiContract version in 18362 SDK
* Fix build with VS2019 compiler
* Fix Win2DValidatePlatformVersion when the version is 10.0
In later versions of Visual Studio, this means "the highest
version out of whatever platform SDKs are installed".
* Add VS2019 support to Win2D.proj
* Use explicit SDK version
* Use PlatformToolset from Win2D.Cpp.props
* Update version in solution file header
* Port ShaderCompiler fixes from xaml_islands branch
* Re-add explicit PlatformToolset
* Update code generator to match manual changes
* Update README
* Update build.cmd
* Update TargetPlatformVersion in sample projects
* Silence deprecation warning/error
* Fix double-definition build error
* Fix ambiguous-definition errors
* Tests running on VS 2019.
We are consolidating all support and customer communication for this project onto GitHub, so merging old information from the blog into the main git repository.
* added vb
* Added code example for Visual Basic
* Inserted VB code example into documention
Inserted VB code example into documention\introduction. #401
Removed the "work in progress" verbiage, which no longer applies now we're
stabilizing for Build.
Organized what was becoming a wall of too many links into sections "Where to
get it", "How to use it", and "More info".
Added a source code link to README.md, so people with clones of the source can
always find their way back to its origin.
Made the links to Example Gallery more visible.
Added an explicit "Report a bug or ask a question" link, as several customers
recently were unsure where to do that.
Alternative, Win2D-NoUAP, package can be built on machines that don't have Win10 SDK installed.
build.cmd does the right thing by default. "nouap" parameter can force building the nouap package.
- add UAP versions of projects
- explicitly list TargetPlatformIdentifier in all projects (makes it easier to robustly make decisions based on platform early on in build process)
- fix up code to compile on VS2015
- use the Windows versions of the Numerics and DirectX types
- Renamed CONTRIBUTING to CONTRIBUTING.md
- Moved directory structure info from README.md to CONTRIBUTING.md
- Updated contribution process
- CLA submission process now automated via the Azure pull request bot
- Detailed the contribution process including How-To for verifying changes
Implementation mostly by Damyan. Finishing up, resolving of todos, tests, and docs by Shawn.
API surface changes:
- Many new draw function overloads
- Remove CanvasEllipse and CanvasRoundedRectangle structs
Additional behavioral changes:
- Fixed bug where DrawText(emptyString) would throw (WinRT doesn't
differentiate between null and empty strings, so this accidentally
triggered our null check)
- Calling one of the DrawText overloads that takes a text format but passing
null format used to throw. Now it uses default format options, the same as if
you call the simple overloads that take no format argument at all. I think
this is a good general principle: where we have both simple and complex
versions of an API, it's good if passing null for the extra parameters of the
complex version can give the same behavior as the simple form.
- Reduced the default font size when no format is specified from 96 to 32. This
simple overload will mostly be for debug text, so the output should be
readable but not huge.
I could not find any existing implementations that were sufficiently complete,
high quality, supported collections of runtime types as well as interfaces and
value types, and were under a suitable open source license, so had to write my
own. Hopefully this Vector.h will fill that hole for others with similar needs
in future!
Features:
- Implements IVector<T> and IIterable<T>, but not IObservableVector<T>
- T can be interface, runtime class, or value type, and is factored such that
strings can easily be added if/when needed.
- Vectors may optionally be locked to a fixed size, in which case users can
change their elements but not add/remove elements.
- Vectors track a dirty flag so their owner can tell when their contents
changed. This is a lightweight internal-only mechanism rather than full
IObservableVector implementation to avoid complications with event handlers
causing circular refcount chains.
- By default vectors own their content data (internally using an STL
collection) but there is also an option to wrap them around some other source
so as to just provide a WinRT API surface on top of any other data.
- Provides an internal mechanism to get direct access to the STL container
inside a WinRT vector, so API implementations can work directly with this
rather than having to go through the overhead of WinRT vtable dispatch and
exception boundaries for every get/set/iterate operation.