Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Win2D 1.21.0 – SVG, improved HDR support, and bugfixes

Win2D version 1.21.0 is now available on NuGet (for Windows 10 or Windows / Phone 8.1) and GitHub.

New in this release:

  • Load, draw, and manipulate SVG (scalable vector graphics) documents  (requires Windows 10 Creators Update)
  • Load and save JpegXR images using extended precision pixel formats  (16 and 32 bit floating point, or 16 bit normalized integer)
  • ColorManagementProfile now supports Simple and Extended types as well as ICC color profiles  (requires Windows 10 Creators Update)
  • Added a CanvasComposition.CreateDrawingSession overload that allows specifying DPI
  • Building Win2D for UWP now requires Visual Studio 2017  (but if you are just using it in an app rather than compiling it yourself, both VS 2015 and 2017 continue to be supported)

Bugfixes:

  • #479 – CanvasVirtualControl OnRegionsInvalidated not triggered when launching app
  • #486 – Crash when resource loading completes after Canvas is already unloaded
  • #487 – ComputeHistogram does not take into account the SourceRectangle
  • #491 – CanvasControl & CanvasVirtualControl do not disable the accessibility view
  • #496 – Crash in Microsoft_Graphics_Canvas RegisteredEvent::Release
  • #498 – CanvasGradientMesh TensorPatch Colors documented incorrectly
  • #515 – Crash when passing a CanvasCommandList to CanvasImage.SaveAsync

Win2D supports a subset of SVG 1.1. For more details, see Direct2D’s page about SVG Support.

Code example:

// Load an SVG document.
var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/sample.svg"));

using (var stream = await file.OpenReadAsync())
{
    svgDocument = await CanvasSvgDocument.LoadAsync(sender, stream);
}

// Draw it.
args.DrawingSession.DrawSvg(svgDocument, sender.Size);

// Modify the SVG.
var eye = svgDocument.FindElementById("right_eye");
eye.SetColorAttribute("fill", Colors.Red);

Share the post

Win2D 1.21.0 – SVG, improved HDR support, and bugfixes

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×