Skip to content
ChartForgeX
Class

RasterAnimationSource

ChartForgeX.Raster

Namespace
ChartForgeX.Raster
Assembly
ChartForgeX
Modifiers
sealed

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

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 required
height int required
frameCount int required
renderFrame System.Func<int, System.Threading.CancellationToken, ChartForgeX.Raster.RasterAnimationFrame> required
additionalWorkingBytes long = 0 optional

Methods

public RasterAnimationFrame GetFrame(int index, CancellationToken cancellationToken = default) #

Renders and validates one frame.

Parameters

index int required
cancellationToken System.Threading.CancellationToken = default optional

Properties

public int Width { get; } #

Gets the complete canvas width in pixels.

public int Height { get; } #

Gets the complete canvas height in pixels.

public int FrameCount { get; } #

Gets the known number of frames.

public long AdditionalWorkingBytes { get; } #

Gets the producer's conservative retained asset and working-buffer estimate, excluding returned frame pixels.