Class Direct2DControl
- Namespace
- PaintDotNet.Controls
- Assembly
- PaintDotNet.Framework.dll
Provides a base WinForms control that renders using Direct2D.
public abstract class Direct2DControl : GdiControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IIsDisposed, IDisposable
- Inheritance
-
Direct2DControl
- Implements
- Derived
- Inherited Members
Constructors
- Direct2DControl()
Initializes a new instance of the Direct2DControl class. A new Direct2D factory is created, providing an isolated resource domain for this control instance.
- Direct2DControl(IDirect2DFactory)
Initializes a new instance of the Direct2DControl, using the given Direct2D factory.
Properties
- AllowHardwareRendering
Specifies whether to allow hardware-accelerated rendering. This can be overridden by user-controlled app settings to force software rendering, and may be disabled for other reasons as well.
The default value is true. For small controls, like buttons or text labels, it is recommended to set this to false. Hardware accelerated rendering should typically be reserved for larger controls, such as the main control or canvas contained in a top-level window (Form).
- UseBackColor
Gets or sets a flag specifying if the IDeviceContext is automatically cleared using BackColor. The default value is true.