Skip to content
ChartForgeX
Class

VisualTurbulence

ChartForgeX.Effects

Namespace
ChartForgeX.Effects
Assembly
ChartForgeX
Modifiers
sealed

One finite immutable four-channel procedural source, independent of SourceGraphic.

Inheritance

  • object
  • VisualTurbulence

Remarks

The authored octave count is retained; output processes at most nine octaves for the 8-bit resolution policy. Four channels share one seeded stream of normalized-square gradients with zero-vector retry. Native output samples physical cell centers and quantizes unassociated channels. NativeFilters delegates phase, precision and intermediate alpha conversion to the browser; byte identity is not promised.

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.

Constructors

public VisualTurbulence(double baseFrequencyX, double? baseFrequencyY = null, int numberOfOctaves = 1, double seed = 0, VisualTurbulenceType type = Turbulence, bool stitchTiles = false, VisualFilterColorSpace colorSpace = Srgb) #

Creates explicit procedural channel policy.

Parameters

baseFrequencyX double required
Finite nonnegative horizontal logical frequency.
baseFrequencyY double? = null optional
Vertical frequency; null selects the horizontal value.
numberOfOctaves int = 1 optional
Nonnegative authored count; zero is a real constant-field case.
seed double = 0 optional
Raw finite seed, normalized without an overflowing double-to-integer conversion.
type ChartForgeX.Effects.VisualTurbulenceType = Turbulence optional
Turbulence uses absolute octave contributions; FractalNoise uses signed contributions.
stitchTiles bool = false optional
Adjusts frequency and lattice wrapping to the actual logical tile extent.
colorSpace ChartForgeX.Effects.VisualFilterColorSpace = Srgb optional
Native explicit working space; SVG resolves its inherited default separately.

Methods

public RgbaImage Generate(VisualSize size, int pixelsPerUnit = 1, CancellationToken cancellationToken = default) #

Generates a detached mutable RGBA image through the common effect/preflight owner.

Parameters

size ChartForgeX.Rendering.VisualSize required
Positive logical tile extent exactly aligned to the selected device grid.
pixelsPerUnit int = 1 optional
Native density from one through sixteen, subject to existing dimension and work caps.
cancellationToken System.Threading.CancellationToken = default optional
Checked before buffers, during setup and each row; never retained.

Returns

RgbaImage Caller-owned unassociated sRGB bytes sampled at actual physical cell centers.
public PreparedVisual Prepare(VisualRenderContext context) #

Captures this immutable procedural source in the caller's existing shared native frame.

Parameters

context ChartForgeX.Rendering.VisualRenderContext required
The resolved viewport, insets, headings, theme and fonts; no token or host service is retained.

Returns

PreparedVisual A detached native source surface, rendered by the same scalar plan in PNG/Baked and finite NativeFilters SVG.

Properties

public double BaseFrequencyX { get; } #

Gets the authored horizontal frequency.

public double BaseFrequencyY { get; } #

Gets the authored vertical frequency.

public int NumberOfOctaves { get; } #

Gets the authored count, before the documented 8-bit output-resolution policy.

public double Seed { get; } #

Gets the original finite seed.

public VisualTurbulenceType Type { get; } #

Gets the finite octave accumulation law.

public bool StitchTiles { get; } #

Gets whether the tile boundary is periodic in logical coordinates.

public VisualFilterColorSpace ColorSpace { get; } #

Gets the selected channel space; alpha is always coverage.