Table of Contents

Method Render

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

Render<TPixel>(IBitmapEffectRenderer, RegionPtr<TPixel>, Point2Int32)

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.

public static void Render<TPixel>(this IBitmapEffectRenderer renderer, RegionPtr<TPixel> buffer, Point2Int32 renderOffset) where TPixel : unmanaged, INaturalPixelInfo

Parameters

renderer IBitmapEffectRenderer
buffer RegionPtr<TPixel>
renderOffset Point2Int32

Type Parameters

TPixel

Remarks

Most BGRA/RGBA pixel formats 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. Integer formats such as Bgra32 will be stored in gamma compressed format (e.g. sRGB), while floating point formats such as ColorRgba128Float will use linear gamma.

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.

Render<TPixel>(IBitmapEffectRenderer, IBitmapLock<TPixel>, Point2Int32)

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.

public static void Render<TPixel>(this IBitmapEffectRenderer renderer, IBitmapLock<TPixel> buffer, Point2Int32 renderOffset) where TPixel : unmanaged, INaturalPixelInfo

Parameters

renderer IBitmapEffectRenderer
buffer IBitmapLock<TPixel>
renderOffset Point2Int32

Type Parameters

TPixel

Remarks

Most BGRA/RGBA pixel formats 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. Integer formats such as Bgra32 will be stored in gamma compressed format (e.g. sRGB), while floating point formats such as ColorRgba128Float will use linear gamma.

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.

Render(IBitmapEffectRenderer, IBitmapLock, Point2Int32)

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.

public static void Render(this IBitmapEffectRenderer renderer, IBitmapLock buffer, Point2Int32 renderOffset)

Parameters

renderer IBitmapEffectRenderer
buffer IBitmapLock
renderOffset Point2Int32

Remarks

Most BGRA/RGBA pixel formats 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. Integer formats such as Bgra32 will be stored in gamma compressed format (e.g. sRGB), while floating point formats such as ColorRgba128Float will use linear gamma.

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.