Skip to content
ChartForgeX
Class

TopologyIconArtwork

ChartForgeX.Topology

Namespace
ChartForgeX.Topology
Assembly
ChartForgeX
Modifiers
sealed
Attributes
Fluent

Describes optional external artwork for a topology icon.

Inheritance

  • object
  • TopologyIconArtwork

Usage

Explore 50 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.

Accepted by parameters 30

Constructors

public TopologyIconArtwork() #

Methods

public static TopologyIconArtwork Image(string href, string svgViewBox = "0 0 24 24") #

Creates image artwork.

Parameters

href string required
svgViewBox string = "0 0 24 24" optional
public static TopologyIconArtwork InlineSvg(string svgBody, string svgViewBox = "0 0 24 24") #

Creates inline SVG artwork.

Parameters

svgBody string required
svgViewBox string = "0 0 24 24" optional
public static bool IsSafeAssetPath(string? path) #

Returns whether an artwork path is safe enough for pack-local file resolution.

Parameters

path string? required

Returns

bool
public static bool IsSafeImageHref(string? href) #

Returns whether an image href is safe enough for report embedding.

Parameters

href string? required

Returns

bool
public static bool IsSafeSvgFragment(string? svgBody) #

Returns whether an inline SVG fragment is safe enough for report embedding.

Parameters

svgBody string? required

Returns

bool
public static TopologyIconArtwork Portrait(RgbaImage image, TopologyPortraitFit fit = Slice) #

Captures an RGBA portrait as deterministic embedded artwork for native raster and SVG output.

Parameters

image ChartForgeX.Raster.RgbaImage required
The complete source image. Its pixels are read only during this call.
fit ChartForgeX.Topology.TopologyPortraitFit = Slice optional
The centered slot fit. Slice fills the existing artwork slot without changing node geometry.

Returns

TopologyIconArtwork Independent artwork; changing the caller's pixel array does not change its image.
public static TopologyIconArtwork SvgFile(string path, string svgViewBox = "0 0 24 24", string? previewPath = null) #

Creates SVG file artwork.

Parameters

path string required
svgViewBox string = "0 0 24 24" optional
previewPath string? = null optional

Properties

public string SvgViewBox { get; set; } #

Gets or sets an SVG viewBox used for inline SVG artwork.

public string? SvgBody { get; set; } #

Gets or sets trusted inline SVG fragment markup, such as path, rect, circle, and linearGradient elements.

public string? SvgPath { get; set; } #

Gets or sets a relative or host-managed path to an SVG file.

public string? PreviewPath { get; set; } #

Gets or sets a relative or host-managed path to a generated preview image.

public string? ImageHref { get; set; } #

Gets or sets an image href, usually a data URI or host-managed URL.

public string PreserveAspectRatio { get; set; } #

Gets or sets the preserveAspectRatio value used when rendering SVG or image artwork.

public bool HasSvgBody { get; } #

Gets whether this artwork defines an inline SVG fragment.

public bool HasSvgPath { get; } #

Gets whether this artwork references an SVG file.

public bool HasPreviewPath { get; } #

Gets whether this artwork references a preview image.

public bool HasImageHref { get; } #

Gets whether this artwork defines an image href.

public bool IsSafe { get; } #

Gets whether inline SVG artwork can be embedded safely.

Extension Methods

public static TopologyIconArtwork ImageHref(TopologyIconArtwork topologyIconArtwork, string? value) #

Sets TopologyIconArtwork.ImageHref: Gets or sets an image href, usually a data URI or host-managed URL.

Parameters

topologyIconArtwork ChartForgeX.Topology.TopologyIconArtwork required
The instance.
value string? required
The value.

Returns

TopologyIconArtwork The same instance.

Examples

// C# initializer or property                                                  // C# fluent
new global::ChartForgeX.Topology.TopologyIconArtwork { ImageHref = value };    topologyIconArtwork.ImageHref(value);
public static TopologyIconArtwork PreserveAspectRatio(TopologyIconArtwork topologyIconArtwork, string value) #

Sets TopologyIconArtwork.PreserveAspectRatio: Gets or sets the preserveAspectRatio value used when rendering SVG or image artwork.

Parameters

topologyIconArtwork ChartForgeX.Topology.TopologyIconArtwork required
The instance.
value string required
The value.

Returns

TopologyIconArtwork The same instance.

Examples

// C# initializer or property                                                            // C# fluent
new global::ChartForgeX.Topology.TopologyIconArtwork { PreserveAspectRatio = value };    topologyIconArtwork.PreserveAspectRatio(value);
public static TopologyIconArtwork PreviewPath(TopologyIconArtwork topologyIconArtwork, string? value) #

Sets TopologyIconArtwork.PreviewPath: Gets or sets a relative or host-managed path to a generated preview image.

Parameters

topologyIconArtwork ChartForgeX.Topology.TopologyIconArtwork required
The instance.
value string? required
The value.

Returns

TopologyIconArtwork The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ChartForgeX.Topology.TopologyIconArtwork { PreviewPath = value };    topologyIconArtwork.PreviewPath(value);
public static TopologyIconArtwork SvgBody(TopologyIconArtwork topologyIconArtwork, string? value) #

Sets TopologyIconArtwork.SvgBody: Gets or sets trusted inline SVG fragment markup, such as path, rect, circle, and linearGradient elements.

Parameters

topologyIconArtwork ChartForgeX.Topology.TopologyIconArtwork required
The instance.
value string? required
The value.

Returns

TopologyIconArtwork The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ChartForgeX.Topology.TopologyIconArtwork { SvgBody = value };    topologyIconArtwork.SvgBody(value);
public static TopologyIconArtwork SvgPath(TopologyIconArtwork topologyIconArtwork, string? value) #

Sets TopologyIconArtwork.SvgPath: Gets or sets a relative or host-managed path to an SVG file.

Parameters

topologyIconArtwork ChartForgeX.Topology.TopologyIconArtwork required
The instance.
value string? required
The value.

Returns

TopologyIconArtwork The same instance.

Examples

// C# initializer or property                                                // C# fluent
new global::ChartForgeX.Topology.TopologyIconArtwork { SvgPath = value };    topologyIconArtwork.SvgPath(value);
public static TopologyIconArtwork SvgViewBox(TopologyIconArtwork topologyIconArtwork, string value) #

Sets TopologyIconArtwork.SvgViewBox: Gets or sets an SVG viewBox used for inline SVG artwork.

Parameters

topologyIconArtwork ChartForgeX.Topology.TopologyIconArtwork required
The instance.
value string required
The value.

Returns

TopologyIconArtwork The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ChartForgeX.Topology.TopologyIconArtwork { SvgViewBox = value };    topologyIconArtwork.SvgViewBox(value);