Skip to content
ChartForgeX
Class

ChartFill

ChartForgeX.Core

Namespace
ChartForgeX.Core
Assembly
ChartForgeX
Modifiers
sealed

An immutable, dependency-free fill shared by chart SVG and native raster output.

Inheritance

  • object
  • ChartFill

Remarks

Gradient coordinates are fractions of each mark's bounds: (0,0) is top-left and (1,1) is bottom-right. Images are embedded pixel snapshots; no files, URLs, browser scripts or external I/O are required.

Usage

Explore 8 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 2

Methods

public static ChartFill Image(RgbaImage image) #

Copies RGBA pixels and stretches the embedded image to each filled mark's bounds.

Parameters

image ChartForgeX.Raster.RgbaImage required

Returns

ChartFill
public static ChartFill LinearGradient(ChartPoint start, ChartPoint end, params ChartGradientStop[] stops) #

Creates a straight gradient with at least two ordered stops.

Parameters

start ChartForgeX.Primitives.ChartPoint required
end ChartForgeX.Primitives.ChartPoint required
stops ChartForgeX.Core.ChartGradientStop[] required

Returns

ChartFill
public static ChartFill Pattern(RgbaImage image, double tileWidth, double tileHeight) #

Copies RGBA pixels and repeats them from the mark's top-left at the specified logical tile size.

Parameters

image ChartForgeX.Raster.RgbaImage required
tileWidth double required
tileHeight double required

Returns

ChartFill
public static ChartFill RadialGradient(ChartPoint center, double radius, params ChartGradientStop[] stops) #

Creates an elliptical gradient whose center and radius use normalized mark coordinates.

Parameters

center ChartForgeX.Primitives.ChartPoint required
radius double required
stops ChartForgeX.Core.ChartGradientStop[] required

Returns

ChartFill

Properties

public ChartFillKind Kind { get; } #

Gets the paint source.

public ChartPoint Start { get; } #

Gets the linear start or radial center in normalized mark coordinates.

public ChartPoint End { get; } #

Gets the linear endpoint in normalized mark coordinates.

public double Radius { get; } #

Gets the radial radius as a fraction of mark width and height.

public IReadOnlyList<ChartGradientStop> Stops { get; } #

Gets the detached ordered stops; image fills have no stops.

public double TileWidth { get; } #

Gets the repeating tile width in logical chart units; zero for other fill kinds.

public double TileHeight { get; } #

Gets the repeating tile height in logical chart units; zero for other fill kinds.