# PreparedVisualStory

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

 Class  

`ChartForgeX.Stories`

**Namespace**

`ChartForgeX.Stories`

**Assembly**

`ChartForgeX.Stories`

**Source**

[PreparedVisualStory.cs:52](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L52)

**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

- Method [VisualStory.Prepare](/api/chartforgex-stories-visualstory/#method-prepare-chartforgex-stories-visualstoryplaybackoptions)

 Filter members   

    Show inherited   

 

## Methods

 Frames 2 overloads 

 `public IEnumerable<RasterAnimationFrame> Frames(VisualStoryFrameOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-frames-chartforgex-stories-visualstoryframeoptions-threading-cancellationtoken) 

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)` [#](#method-frames-chartforgex-raster-rasteranimationformat-chartforgex-stories-visualstoryframeoptions-threading-cancellationtoken) 

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)` [#](#method-framesource-chartforgex-raster-rasteranimationformat-chartforgex-stories-visualstoryframeoptions) 

[PreparedVisualStory.cs:104](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L104)

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**

Returns

 `RasterAnimationSource` 

 `public RasterAnimationSource FrameSource(VisualStoryFrameOptions? options = null)` [#](#method-framesource-chartforgex-stories-visualstoryframeoptions) 

[PreparedVisualStory.cs:113](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L113)

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**

Returns

 `RasterAnimationSource` 

 `public PreparedVisual PrepareFrame(TimeSpan timestamp)` [#](#method-prepareframe-timespan) 

[PreparedVisualStory.cs:56](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L56)

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

Parameters

**timestamp System.TimeSpan required**

Returns

 `PreparedVisual` 

 `public RgbaImage RenderAt(TimeSpan timestamp, int outputScale = 1)` [#](#method-renderat-timespan-int32) 

[PreparedVisualStory.cs:52](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L52)

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)` [#](#method-toanimatedsvg-chartforgex-stories-visualstoryframeoptions-string-threading-cancellationtoken) 

[PreparedVisualStory.Svg.cs:23](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.Svg.cs#L23)

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)` [#](#method-toapng-chartforgex-stories-visualstoryframeoptions-threading-cancellationtoken) 

[PreparedVisualStory.Export.cs:16](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.Export.cs#L16)

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)` [#](#method-togif-chartforgex-stories-visualstoryframeoptions-threading-cancellationtoken) 

[PreparedVisualStory.Export.cs:11](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.Export.cs#L11)

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)` [#](#method-tohtmlpage-chartforgex-stories-visualstoryframeoptions-threading-cancellationtoken) 

[PreparedVisualStory.Svg.cs:16](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.Svg.cs#L16)

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)` [#](#method-topng-nullable-system-timespan-int32) 

[PreparedVisualStory.cs:84](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L84)

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)` [#](#method-tosvg-nullable-system-timespan) 

[PreparedVisualStory.cs:59](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L59)

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

Parameters

**timestamp System.TimeSpan? = null optional**

Returns

 `string` 

 `public string ToTranscript()` [#](#method-totranscript) 

[PreparedVisualStory.cs:87](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L87)

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)` [#](#method-writeanimation-io-stream-chartforgex-raster-rasteranimationformat-chartforgex-stories-visualstoryframeoptions-threading-cancellationtoken) 

[PreparedVisualStory.Export.cs:22](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.Export.cs#L22)

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**

## Inherited Methods

 `public virtual bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from object

Parameters

**obj object? required**

Returns

 `bool` 

 `public virtual int GetHashCode()` [#](#method-gethashcode) 

Inherited from object

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public virtual string? ToString()` [#](#method-tostring) 

Inherited from object

Returns

 `string?` 

## Properties

 `public string Title { get; }` [#](#property-title) 

[PreparedVisualStory.cs:36](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L36)

Gets the title captured during preparation.

 `public int Width { get; }` [#](#property-width) 

[PreparedVisualStory.cs:38](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L38)

Gets the logical width.

 `public int Height { get; }` [#](#property-height) 

[PreparedVisualStory.cs:40](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L40)

Gets the logical height.

 `public TimeSpan ContentDuration { get; }` [#](#property-contentduration) 

[PreparedVisualStory.cs:42](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L42)

Gets the authored duration before the completed-state hold.

 `public TimeSpan Duration { get; }` [#](#property-duration) 

[PreparedVisualStory.cs:44](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L44)

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

 `public VisualStoryPlaybackOptions Playback { get; }` [#](#property-playback) 

[PreparedVisualStory.cs:46](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L46)

Gets immutable playback timing.

 `public IReadOnlyList<VisualStoryChapter> Chapters { get; }` [#](#property-chapters) 

[PreparedVisualStory.cs:48](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX.Stories/Stories/PreparedVisualStory.cs#L48)

Gets detached scene boundaries for seeking.

<!-- PowerForge markdown artifact sha256:E9190EC6F370C13C9C914EFCCBAC2C0AD5CC20980EBA9D83A31A002E8E4CDAD6 -->
