Table of Contents

Enum PremultipliedAdapterOptions

Namespace
PaintDotNet.Imaging
Assembly
PaintDotNet.Windows.Framework.dll
[Flags]
public enum PremultipliedAdapterOptions

Fields

None = 0

Reinterprets the bitmap in the new pixel format. The same memory is referenced by both the original bitmap and the adapter; a copy is not made. This is useful for adapting an IBitmap<TPixel> from ColorBgra32 to ColorPbgra32 for rendering with Direct2D.

PremultiplyOnCreate = 1

The contents of the bitmap are converted to premultiplied alpha at the time the adapter is created. Using this option enables the correct rendering of Direct2D content on top of non-Direct2D content. This option is not necessary if the bitmap is blank (filled with transparent black, or is completely opaque).

UnPremultiplyOnDispose = 2

The contents of the bitmap are converted to straight alpha when the adapter is disposed. If the bitmap is not disposed, and left for the garbage collector to clean up, then conversion is not performed.