Skip to content

v4.0.0 - Software Render Target support

Compare
Choose a tag to compare
@d2phap d2phap released this 09 Nov 13:11
· 2 commits to main since this release

Install/Update it from NuGet:

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

🔴 Breaking change

  • Updated the root namespace from D2Phap to D2Phap.DXControl
  • Renamed class D2Phap.DXControl to D2Phap.DXControl.DXCanvas
  • Removed support for drawing with GDI+
    • Removed classes: IGraphics, GdipGraphics, use DXGraphics instead
  • Added support for creating Software render target
    • Setting UseHardwareAcceleration = false to switch to Software render target
    • Added new virtual method: OnDeviceCreated(DeviceCreatedReason reason)
    • Added new event DeviceCreated

🟠 Note:

Changing value of the property UseHardwareAcceleration causes the Device recreated, you can use the DeviceCreated event to dispose the resources of the old device such as ID2D1Bitmap or Geometry. Refer to Demo project for more details.

🔵 Migration

v3.3 v4.0
using D2Phap; using D2Phap.DXControl
public class DemoCanvas : DXControl public class DemoCanvas : DXCanvas
protected override void OnRender(IGraphics g) protected override void OnRender(DXGraphics g)

Full Changelog: 3.3.0...4.0.0