Skip to content

v2.5.0 - Direct2D 1.3

Compare
Choose a tag to compare
@d2phap d2phap released this 25 Feb 16:09
· 13 commits to main since this release

Install/Update it from Nuget:

https://www.nuget.org/packages/D2Phap.DXControl

What's new:

  • Use Direct2D 1.3 features by default (see Breaking changes).
  • Exposed event VerticalBlankTickerWaitError to handle exception from VerticalBlankTicker.
  • Added virtual method void OnVerticalBlankTickerWaitError(VerticalBlankTickerErrorEventArgs e).
  • Fixed Win32 WAIT_TIMEOUT error: The wait operation timed out. when the monitor is turned off.

⚠️ Breaking changes!

These changes are because of upgrading to Direct2D 1.3, and using IComObject<> to utilize the extension methods.

1. DXControl class

Properties Old type New type
DXControl.RenderTarget ID2D1HwndRenderTarget IComObject<ID2D1HwndRenderTarget>
DXControl.Device ID2D1DeviceContext IComObject<ID2D1DeviceContext6>
DXControl.Direct2DFactory ID2D1Factory IComObject<ID2D1Factory1>
DXControl.DirectWriteFactory IDWriteFactory IComObject<IDWriteFactory5>

2. D2DGraphics class

Old type New type
The argument object? bitmap in D2DGraphics.DrawBitmap(...) ID2D1Bitmap ComObject<ID2D1Bitmap1>
D2DGraphics.DeviceContext ID2D1DeviceContext IComObject<ID2D1DeviceContext6>

3. DXHelper class

Old type New type
The argument bmp in DXHelper.DisposeD2D1Bitmap(...) ID2D1Bitmap IComObject<ID2D1Bitmap1>
The return value of DXHelper.CreateDefaultBitmapProps(...) D2D1_BITMAP_PROPERTIES D2D1_BITMAP_PROPERTIES1
The argument dc in DXHelper.ToD2D1Bitmap(...) ID2D1DeviceContext IComObject<ID2D1DeviceContext6>
The return value of DXHelper.ToD2D1Bitmap(...) ComObject<ID2D1Bitmap> IComObject<ID2D1Bitmap1>

Full Changelog: 2.4.1...2.5.0