Class
RasterAnimationSource
ChartForgeX.Raster
A repeatable bounded frame producer with known dimensions and count.
Inheritance
- object
- RasterAnimationSource
Remarks
GIF makes a palette pass and an encoding pass. Each index must return identical pixels and timing on both passes. Buffers are borrowed only until the next frame is requested.
Usage
Explore 3 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
Accepted by parameters 2
- Method RasterAnimationEncoder.Encode
- Method RasterAnimationEncoder.WriteTo
Constructors
public RasterAnimationSource(int width, int height, int frameCount, Func<int, CancellationToken, RasterAnimationFrame> renderFrame, long additionalWorkingBytes = 0) #Creates a deterministic frame source. Rendering is deferred until encoding or reading.
Parameters
- width int
- height int
- frameCount int
- renderFrame System.Func<int, System.Threading.CancellationToken, ChartForgeX.Raster.RasterAnimationFrame>
- additionalWorkingBytes long = 0
Methods
public RasterAnimationFrame GetFrame(int index, CancellationToken cancellationToken = default) #Renders and validates one frame.
Parameters
- index int
- cancellationToken System.Threading.CancellationToken = default
Returns
RasterAnimationFrameInherited Methods
Properties
public long AdditionalWorkingBytes { get; } #Gets the producer's conservative retained asset and working-buffer estimate, excluding returned frame pixels.