API Reference
RasterAnimationSource
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(Int32 width, Int32 height, Int32 frameCount, Func<Int32, CancellationToken, RasterAnimationFrame> renderFrame, Int64 additionalWorkingBytes = 0) #Creates a deterministic frame source. Rendering is deferred until encoding or reading.
Parameters
- width System.Int32
- height System.Int32
- frameCount System.Int32
- renderFrame System.Func<System.Int32, System.Threading.CancellationToken, ChartForgeX.Raster.RasterAnimationFrame>
- additionalWorkingBytes System.Int64 = 0
Methods
public RasterAnimationFrame GetFrame(Int32 index, CancellationToken cancellationToken = default) #RasterAnimationFrameRenders and validates one frame.
Parameters
- index System.Int32
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public Int32 Width { get; } #Gets the complete canvas width in pixels.
public Int32 Height { get; } #Gets the complete canvas height in pixels.
public Int32 FrameCount { get; } #Gets the known number of frames.
public Int64 AdditionalWorkingBytes { get; } #Gets the producer's conservative retained asset and working-buffer estimate, excluding returned frame pixels.