Skip to content
ChartForgeX
Class

PreparedVisualStory

ChartForgeX.Stories

Namespace
ChartForgeX.Stories
Assembly
ChartForgeX.Stories
Modifiers
sealed

A detached story observation with one clock for seeking, playback and export.

Inheritance

  • object
  • PreparedVisualStory

Remarks

Rendering clamps to one play. Repetition is an export or player policy; the endpoint remains the completed scene.

Usage

Explore 1 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

Methods

Frames 2 overloads
public IEnumerable<RasterAnimationFrame> Frames(VisualStoryFrameOptions? options = null, CancellationToken cancellationToken = default) #

Produces owning frames lazily, using rational cadence and exact tick durations.

Parameters

options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

IEnumerable<RasterAnimationFrame>
public IEnumerable<RasterAnimationFrame> Frames(RasterAnimationFormat format, VisualStoryFrameOptions? options = null, CancellationToken cancellationToken = default) #

Produces owning frames with the selected container's timing and Stories readability policy.

Parameters

format ChartForgeX.Raster.RasterAnimationFormat required
options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

IEnumerable<RasterAnimationFrame>
FrameSource 2 overloads
public RasterAnimationSource FrameSource(RasterAnimationFormat format, VisualStoryFrameOptions? options = null) #

Creates a repeatable producer with container-specific timing, including GIF visibility and viewer delay limits.

Parameters

format ChartForgeX.Raster.RasterAnimationFormat required
options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
public RasterAnimationSource FrameSource(VisualStoryFrameOptions? options = null) #

Creates a repeatable frame source on the exact tick clock, suitable for timestamp observations and optional video encoders.

Parameters

options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
public PreparedVisual PrepareFrame(TimeSpan timestamp) #

Prepares a timestamp as native geometry shared by SVG and PNG backends.

Parameters

timestamp System.TimeSpan required
public RgbaImage RenderAt(TimeSpan timestamp, int outputScale = 1) #

Renders an independently owned RGBA frame at a timestamp within one play.

Parameters

timestamp System.TimeSpan required
outputScale int = 1 optional

Returns

RgbaImage
public string ToAnimatedSvg(VisualStoryFrameOptions? options = null, string idScope = "", CancellationToken cancellationToken = default) #

Exports sampled native frames as a self-contained, script-free SVG animation using the prepared playback clock.

Parameters

options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
idScope string = "" optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

string

Exceptions

  • InvalidOperationException – Sampling exceeds its frame budget, misses a readable chapter, or exceeds the document budget.
public byte[] ToApng(VisualStoryFrameOptions? options = null, CancellationToken cancellationToken = default) #

Encodes APNG while producing and releasing one frame at a time.

Parameters

options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

byte[]
public byte[] ToGif(VisualStoryFrameOptions? options = null, CancellationToken cancellationToken = default) #

Encodes GIF with a global palette and bounded two-pass frame production.

Parameters

options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

byte[]
public string ToHtmlPage(VisualStoryFrameOptions? options = null, CancellationToken cancellationToken = default) #

Exports a script-free HTML page using the captured story and prepared playback clock.

Parameters

options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public byte[] ToPng(TimeSpan? timestamp = null, int outputScale = 1) #

Renders a PNG at a timestamp; omission selects the completed poster.

Parameters

timestamp System.TimeSpan? = null optional
outputScale int = 1 optional

Returns

byte[]
public string ToSvg(TimeSpan? timestamp = null) #

Exports a static vector frame at a timestamp; omission selects the completed poster.

Parameters

timestamp System.TimeSpan? = null optional

Returns

string
public string ToTranscript() #

Gets the captured accessible transcript, including complete source and terminal output.

Returns

string
public void WriteAnimation(Stream stream, RasterAnimationFormat format, VisualStoryFrameOptions? options = null, CancellationToken cancellationToken = default) #

Writes an animation directly to a caller-owned stream without retaining the encoded file.

Parameters

stream System.IO.Stream required
format ChartForgeX.Raster.RasterAnimationFormat required
options ChartForgeX.Stories.VisualStoryFrameOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Properties

public string Title { get; } #

Gets the title captured during preparation.

public int Width { get; } #

Gets the logical width.

public int Height { get; } #

Gets the logical height.

public TimeSpan ContentDuration { get; } #

Gets the authored duration before the completed-state hold.

public TimeSpan Duration { get; } #

Gets one complete play, including the completed-state hold.

public VisualStoryPlaybackOptions Playback { get; } #

Gets immutable playback timing.

public IReadOnlyList<VisualStoryChapter> Chapters { get; } #

Gets detached scene boundaries for seeking.