DXControl

🖌️ A WinForms hybrid control that supports Direct2D and GDI+ drawing

MIT License

Stars
24
Committers
1

Bot releases are visible (Hide)

DXControl - v3.1.0 Latest Release

Published by d2phap 9 months ago

Install/Update it from NuGet:

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

Changelog

  • Replaced VerticalBlankTicker implementation with .NET PeriodicTimer in OnRender() function to fix issues occurred on Windows Server

Full Changelog: https://github.com/d2phap/DXControl/compare/3.0.2...3.1.0

DXControl - v3.0.2

Published by d2phap 10 months ago

Install/Update it from NuGet:

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

Changelog

  • Attempt to fix error 0xc000000d occurred on Windows Server 2019

Full Changelog: https://github.com/d2phap/DXControl/compare/3.0.1...3.0.2

DXControl - v3.0.1 - .NET 8 GA

Published by d2phap 11 months ago

Install/Update it from NuGet:

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

What's new:

  • Built against .NET 8 GA

Full Changelog: https://github.com/d2phap/DXControl/compare/3.0.0...3.0.1

DXControl - v3.0.0 - WicNet 1.7.1 support

Published by d2phap 12 months ago

Install/Update it from Nuget:

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

What's new:

  • Upgrade WicNet to v1.7.1

⚠️ There are some breaking changes from WicNet v1.7.1:

  • DirectNStandard is now a dependency
  • _D3DCOLORVALUE.FromColor() method is replaced with Color.ToD3DCOLORVALUE()

Full Changelog: https://github.com/d2phap/DXControl/compare/2.7.0...3.0.0

DXControl - v2.7.0 - .NET 8 support

Published by d2phap about 1 year ago

Install/Update it from Nuget:

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

What's new:

  • Support .NET 8

Full Changelog: https://github.com/d2phap/DXControl/compare/2.6.0...2.7.0

DXControl - v2.6.0

Published by d2phap over 1 year ago

Install/Update it from Nuget:

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

What's new:

Full Changelog: https://github.com/d2phap/DXControl/compare/2.5.0...2.6.0

DXControl - v2.5.0 - Direct2D 1.3

Published by d2phap over 1 year ago

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: https://github.com/d2phap/DXControl/compare/2.4.1...2.5.0

DXControl - 2.4.1 - Chore

Published by d2phap over 1 year ago

Install/Update it from Nuget:

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

What's new:

  • Updated WicNet to v1.6.4.1.
  • Removed DISPLAY_DEVICE, DISPLAY_DEVICE_FLAGS files.
  • Removed extensions methods: CapitalizeFirst(), EqualsIgnoreCase(), Nullify().

Full Changelog: https://github.com/d2phap/DXControl/compare/2.3.1...2.4.1

DXControl - v2.3.1 - `MeasureText` fix

Published by d2phap almost 2 years ago

Install/Update it from Nuget:

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

What's new:

  • Fixed D2DGraphics.MeasureText() is not correct.
  • Exposed all private variable of DXControl as protected variables.

Full Changelog: https://github.com/d2phap/DXControl/compare/2.3.0...2.3.1

DXControl - v2.3.0 - DPI improvement

Published by d2phap almost 2 years ago

Install/Update it from Nuget:

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

What's new:

  • Improves DPI scaling for drawing text
  • Updates WicNet to v1.6.1
  • Adds support for .NET 7

⚠️ Breaking changes!

  • Removed methods: DrawGeometry, GetCombinedRectanglesGeometry, GetCombinedEllipsesGeometry from the interface IGraphics, but kept it for D2DGraphics

Full Changelog: https://github.com/d2phap/DXControl/compare/2.2.0...2.3.0

DXControl - v2.2.0 - DrawGeometry

Published by d2phap about 2 years ago

Install/Update it from Nuget:

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

What's new:

  • Added 3 new methods to IGraphics interface:
    • GetCombinedRectanglesGeometry()
    • GetCombinedEllipsesGeometry()
    • DrawGeometry()
  • Added D2DFactory property to D2DGraphics

WIP / Limitation:

  • When using method DrawGeometry() in GdiGraphics, only CombineMode.Intesect and CombineMode.Exclude work correctly.

Full Changelog: https://github.com/d2phap/DXControl/compare/2.1.0...2.2.0

DXControl - v2.1.0 - Unkown Error 0xc01e0006

Published by d2phap about 2 years ago

Install/Update it from Nuget:

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

What's Changed

Full Changelog: https://github.com/d2phap/DXControl/compare/2.0.0...2.1.0

DXControl - v2.0.0 - Hybrid graphics

Published by d2phap about 2 years ago

What's Changed

  • Added support for drawing hybrid graphics by IGraphics interface
  • Replaced OnDirect2DRender() and OnGdiPlusRender() by OnRender(IGraphics)
  • Replaced events: RenderByDirect2D and RenderByGdiPLus by Render
  • Removed DXGraphics class, use IGraphics instead.
  • Added new helper functions to DXHelper.
  • Added new enums: DirectN.D2D1_BITMAP_BRUSH_PROPERTIES, DirectN.D2D1_BITMAP_BRUSH_PROPERTIES1

Full Changelog: https://github.com/d2phap/DXControl/compare/1.1.0...2.0.0

DXControl - v1.1.0 - Stable release

Published by d2phap about 2 years ago

DXControl - v1.0.3 - First release

Published by d2phap about 2 years ago

Related Projects