Skip to content
ChartForgeX
Class

VisualArtifact

ChartForgeX.VisualArtifacts

Namespace
ChartForgeX.VisualArtifacts
Assembly
ChartForgeX
Modifiers
sealed

Describes one product-neutral visual artifact that can be rendered, inspected, exported, or handed to a host adapter.

Inheritance

  • object
  • VisualArtifact

Usage

Explore 122 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 91

Accepted by parameters 31

Constructors

public VisualArtifact() #

Methods

public VisualArtifact Clone() #

Copies the artifact's host envelope independently of its semantic model and static presentation.

Returns

VisualArtifact A new artifact with independent metadata, accessibility, regions, and legend items.
public static VisualArtifact Create(string id, VisualArtifactKind kind, object model) #

Creates a visual artifact envelope for a model.

Parameters

id string required
kind ChartForgeX.VisualArtifacts.VisualArtifactKind required
model object required
public bool SupportsExport(VisualArtifactExportFormat format) #

Returns true when the requested formats are declared and an explicitly queried prepared JSON handoff fits its portable contract.

Parameters

format ChartForgeX.VisualArtifacts.VisualArtifactExportFormat required

Returns

bool

Properties

public IVisualArtifactExportPolicy? ExportPolicy { get; set; } #

Gets or sets an optional producer/host policy for SVG, native pixels, PNG and standalone HTML exports.

public VisualArtifactHtmlSizing HtmlSizing { get; set; } #

Gets or sets the producer's default standalone HTML sizing. Explicit export options override it.

public string Id { get; set; } #

Gets or sets a stable artifact identifier.

public VisualArtifactKind Kind { get; set; } #

Gets or sets the artifact kind.

public VisualArtifactSourceLanguage SourceLanguage { get; set; } #

Gets or sets the source language used to author the artifact.

public string Title { get; set; } #

Gets or sets the artifact title.

public string Subtitle { get; set; } #

Gets or sets the artifact subtitle.

public object? Model { get; set; } #

Gets or sets the renderer-independent artifact model.

public IStaticVisualSource? RenderSource { get; set; } #

Gets or sets a producer-owned static presentation, independently of the semantic model.

public VisualArtifactExportFormat ExportFormats { get; set; } #

Gets or sets the static export formats supported by this artifact.

public VisualSize? NaturalSize { get; set; } #

Gets or sets the artifact's natural size in pixels when known.

public bool PreserveNaturalSize { get; set; } #

Gets or sets a value indicating whether exporters must preserve VisualArtifact.NaturalSize when a renderer prepares content on a larger internal canvas.

public Dictionary<string, string> Metadata { get; } #

Gets artifact metadata for host adapters and exporters.

public VisualAccessibility Accessibility { get; } #

Gets renderer-independent accessibility metadata for host adapters and capable exporters.

public List<VisualArtifactRegion> Regions { get; } #

Gets host-inspectable visual regions.

public List<VisualArtifactLegendItem> Legend { get; } #

Gets legend items associated with the artifact.

Extension Methods

AddWatermarks 2 overloads
public static VisualArtifact AddWatermarks(VisualArtifact artifact, params VisualWatermark[] watermarks) #

Appends a snapshot of the supplied watermarks in declaration order.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] required
public static VisualArtifact AddWatermarks(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions, params VisualWatermark[] watermarks) #

Appends watermark presentation over a static source resolved with the supplied core options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] required
public static VisualSize MeasureRasterSize(VisualArtifact artifact, VisualArtifactRenderOptions? options = null) #

Measures the exact destination pixel dimensions of a core native artifact without allocating its raster canvas.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optional

Returns

VisualSize
SaveHtml 2 overloads
public static void SaveHtml(VisualArtifact artifact, string path) #

Saves a supported visual artifact model to a standalone HTML page.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The artifact envelope.
path string required
The target HTML path.
public static void SaveHtml(VisualArtifact artifact, string path, VisualArtifactRenderOptions? options) #

Saves a supported visual artifact model to standalone HTML with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
path string required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required
SavePng 2 overloads
public static void SavePng(VisualArtifact artifact, string path) #

Saves a supported visual artifact model to PNG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The artifact envelope.
path string required
The target PNG path.
public static void SavePng(VisualArtifact artifact, string path, VisualArtifactRenderOptions? options) #

Saves a supported visual artifact model to PNG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
path string required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required
SaveSvg 2 overloads
public static void SaveSvg(VisualArtifact artifact, string path) #

Saves a supported visual artifact model to SVG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The artifact envelope.
path string required
The target SVG path.
public static void SaveSvg(VisualArtifact artifact, string path, VisualArtifactRenderOptions? options) #

Saves a supported visual artifact model to SVG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
path string required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required
ToHtmlPage 2 overloads
public static string ToHtmlPage(VisualArtifact artifact) #

Renders a supported visual artifact model to a standalone HTML page.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The artifact envelope.

Returns

string HTML markup.
public static string ToHtmlPage(VisualArtifact artifact, VisualArtifactRenderOptions? options) #

Renders a supported visual artifact model to a standalone HTML page with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required

Returns

string
public static VisualArtifactInterchangeEnvelope ToInterchangeEnvelope(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions = null) #

Creates a versioned semantic interchange envelope for an artifact.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The artifact to project.
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optional
Optional topology preparation options used to capture deterministic coordinates.

Returns

VisualArtifactInterchangeEnvelope A portable semantic envelope. Unsupported visual kinds retain common metadata and use their separately rendered SVG fallback.
public static string ToInterchangeJson(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions = null) #

Serializes an artifact's semantic interchange envelope to deterministic JSON.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optional

Returns

string
public static byte[] ToInterchangeUtf8Json(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions = null) #

Serializes an artifact's semantic interchange envelope to deterministic UTF-8 JSON bytes.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optional

Returns

byte[]
ToPng 2 overloads
public static byte[] ToPng(VisualArtifact artifact) #

Renders a supported visual artifact model to PNG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The artifact envelope.

Returns

byte[] PNG bytes.
public static byte[] ToPng(VisualArtifact artifact, VisualArtifactRenderOptions? options) #

Renders a supported visual artifact model to PNG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required

Returns

byte[]
public static RgbaImage ToRgbaImage(VisualArtifact artifact, VisualArtifactRenderOptions? options = null) #

Renders an artifact directly to native pixels, before format encoding.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The source semantics and optional static presentation.
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? = null optional
Optional core rendering options. Raster encoding options apply when encoding the result.

Returns

RgbaImage A detached RGBA image at the producer's configured output density.
ToSvg 3 overloads
public static string ToSvg(VisualArtifact artifact) #

Renders a supported visual artifact model to SVG.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The artifact envelope.

Returns

string SVG markup.
public static string ToSvg(VisualArtifact artifact, VisualArtifactRenderOptions? options) #

Renders a supported visual artifact model to SVG with artifact-wide options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required

Returns

string
public static string ToSvg(VisualArtifact artifact, VisualArtifactRenderOptions? options, string idScope) #

Renders SVG with a caller-owned namespace for embedding several artifacts in one document.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
options ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required
idScope string required

Returns

string
ToWatermarkedArtifact 2 overloads
public static VisualArtifact ToWatermarkedArtifact(VisualArtifact artifact, params VisualWatermark[] watermarks) #

Creates a detached artifact envelope with watermark presentation in declaration order.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] required
public static VisualArtifact ToWatermarkedArtifact(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions, params VisualWatermark[] watermarks) #

Creates a detached watermarked artifact with static presentation resolved using the supplied core options.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] required
ToWatermarkedHtmlPage 2 overloads
public static string ToWatermarkedHtmlPage(VisualArtifact artifact, string renderedSvg, params VisualWatermark[] watermarks) #

Wraps trusted, already-rendered SVG with watermarks in a standalone HTML page.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The unchanged host envelope supplying the title, language, and natural-size fallback.
renderedSvg string required
A complete trusted SVG document supplied by a static or animated renderer.
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] required
Watermarks captured in declaration order.

Returns

string A standalone page containing the decorated SVG and the artifact's host title and language.
public static string ToWatermarkedHtmlPage(VisualArtifact artifact, VisualArtifactRenderOptions? renderOptions, string renderedSvg, params VisualWatermark[] watermarks) #

Wraps trusted, already-rendered SVG with watermarks and explicit HTML host sizing.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The unchanged host envelope supplying the title, language, and natural-size fallback.
renderOptions ChartForgeX.VisualArtifacts.VisualArtifactRenderOptions? required
HTML sizing options; other rendering options do not alter the supplied SVG.
renderedSvg string required
A complete trusted SVG document supplied by a static or animated renderer.
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] required
Watermarks captured in declaration order.

Returns

string A standalone page containing the decorated SVG with the selected host sizing.
public static string ToWatermarkedSvg(VisualArtifact artifact, string renderedSvg, params VisualWatermark[] watermarks) #

Appends watermark layers to trusted, already-rendered SVG without resolving the artifact's model.

Parameters

artifact ChartForgeX.VisualArtifacts.VisualArtifact required
The unchanged host envelope; its natural size is a fallback when SVG dimensions are absent.
renderedSvg string required
A complete trusted SVG document supplied by a static or animated renderer.
watermarks ChartForgeX.VisualArtifacts.VisualWatermark[] required
Watermarks captured in declaration order.

Returns

string The supplied markup with watermark layers inserted before its closing SVG element.