New this sprint:
- Added CanvasTextLayout SetBrush and SetColor methods, which allow regions of different colors within a single layout
- Added CanvasAnimatedControl.RunOnGameLoopThreadAsync
- CanvasSwapChain.ResizeBuffers can now change DPI as well as size
- Fixed bug where ICanvasTimingInformation.IsRunningSlowly was not always returning the correct information
- Added RemoveFromVisualTree method to CanvasControl and CanvasAnimatedControl (used by Example Gallery to break reference count cycles)
- Reviewed the entire D2D API for things we’d forgotten to expose in Win2D, which produced some new (low priority) backlog items
We also made a significant breaking change to the effects API:
- Renamed IEffect -> IGraphicsEffect
- Renamed IEffectInput -> IGraphicsEffectSource
- Removed EffectId, Inputs, and Properties from the IEffect interface
- Added CompositeEffect.Sources as a replacement for IEffect.Inputs
- Added IGraphicsEffect.Name property
Breaking changes are going to be a theme over the next few weeks as we approach the Build conference. We plan to release a somewhat stable version of Win2D, including Win10 UAP support, in time for Build. We’re not promising zero breaking changes after that point (this will not be our final 1.0 release) but we’re aiming for a greatly reduced rate of churn compared to what you’ve seen so far. Which, of course, means the next few weeks are our last chance to tear things up! So we’ll be taking a short break from adding new features in order to revisit some designs that we’re not entirely happy with:
- DrawImage overloads are inconsistent and frustrating
- Should we have more nesting underneath the Microsoft.Graphics.Canvas namespace, to remove clutter?
- Reconcile the various text direction / flow options between XAML and DWrite
- Weird interaction between CanvasTextFormat.LineSpacing and LineSpacingMethod
- Is the CanvasSwapChain.ResizeBuffers DPI parameter in the right order? What about other methods that take a DPI?
Please bear with us and pardon the mess while we fix these things up. Taking the time to get them right will make the API better in the long run. Also, please let us know if there are other things you find wrong or confusing about our current API designs. Not missing things (we can add new APIs easily at any time) but any designs you think are less awesome than they could/should be.