Table of Contents

Method Render

Namespace
PaintDotNet.Effects
Assembly
PaintDotNet.Effects.Core.dll

Render(void*, int, nint, in PixelFormat, RectInt32)

Renders the requested area and stores the result in the given buffer. The entire buffer is written to, including areas that are outside of the selection. The caller must perform any masking or blending.

void Render(void* pBuffer, int bufferStride, nint bufferSize, in PixelFormat bufferPixelFormat, RectInt32 renderRect)

Parameters

pBuffer void*
bufferStride int
bufferSize nint
bufferPixelFormat PixelFormat
renderRect RectInt32

Remarks

Any pixel format can be used for the buffer. If it matches the pixel format that the effect is using for its output buffer, no conversion will be necessary and performance will be optimal.

This method will handle clearing / zero-filling the buffer if necessary based on whether the effect uses UninitializedOutputBuffer. It is never necessary for the caller to clear / zero-fill the buffer before passing it to this method.

Exceptions

InvalidOperationException

Initialize(BitmapEffectInitializeInfo) must be called first.