v4.0.0 - Software Render Target support
Install/Update it from NuGet:
https://www.nuget.org/packages/D2Phap.DXControl
🔴 Breaking change
- Updated the root namespace from
D2Phap
toD2Phap.DXControl
- Renamed class
D2Phap.DXControl
toD2Phap.DXControl.DXCanvas
- Removed support for drawing with GDI+
- Removed classes:
IGraphics
,GdipGraphics
, useDXGraphics
instead
- Removed classes:
- 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
- Setting
🟠 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