Kōtuku
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Config
    • Core
    • Display
    • Document
    • Font
    • HTTP
    • Network
    • Regex
    • SVG
    • Tiri
    • Vector
    • XML
    • XQuery
    • XRandR
      • Audio
      • MP3
      • Sound
      • File
      • MetaClass
      • Module
      • StorageDevice
      • Task
      • Thread
      • Time
      • Compression
      • CompressedStream
      • Config
      • LZMAStream
      • Script
      • Tiri
      • XML
      • XQuery
      • Controller
      • BlurFX
      • ColourFX
      • CompositeFX
      • ConvolveFX
      • DisplacementFX
      • FilterEffect
      • FloodFX
      • ImageFX
      • LightingFX
      • MergeFX
      • MorphologyFX
      • OffsetFX
      • RemapFX
      • SourceFX
      • TurbulenceFX
      • WaveFunctionFX
      • Scintilla
      • Bitmap
      • Clipboard
      • Display
      • Document
      • Font
      • Image
      • Pointer
      • Surface
      • SVG
      • ClientSocket
      • HTTP
      • NetClient
      • NetLookup
      • NetServer
      • NetSocket
      • Proxy
      • Gradient
      • GradientConic
      • GradientContour
      • GradientDiamond
      • GradientDiffusion
      • GradientDistal
      • GradientGouraud
      • GradientLinear
      • GradientMesh
      • GradientRadial
      • GradientVoronoi
      • Vector
      • VectorClip
      • VectorColour
      • VectorEllipse
      • VectorFilter
      • VectorGradient
      • VectorGroup
      • VectorImage
      • VectorPath
      • VectorPattern
      • VectorPolygon
      • VectorRectangle
      • VectorScene
      • VectorShape
      • VectorSpiral
      • VectorText
      • VectorTransition
      • VectorViewport
      • VectorWave
      • Linux Builds
      • Windows Builds
      • Customising Your Build
      • Kōtuku Objects
      • Kōtuku In Depth
      • Kōtuku Design Patterns
      • Coding With AI
      • Regex Manual
      • XML Comparisons
      • Tiri Reference Manual
      • Config API
      • Defer Syntax
      • GUI API
      • HTTP Server API
      • I/O API
      • JSON API
      • OAuth API
      • Options API
      • Proxy Server API
      • Tempus API
      • URL API
      • VFX API
      • Widgets
      • RIPL Reference Manual
      • Origo
      • Flute / Unit Testing
      • Tuku
      • Embedded Document Format
      • TDL Reference Manual
      • TDL Tools
      • Action Reference Manual
      • System Error Codes

GradientDistal Class

Signed distance field colour gradient paint server.

GradientDistal shades inward and outward from the target vector path outline. The path outline is pinned to the centre of the colour ramp, Radius controls exterior padding, and InnerRadius controls interior fade-out.

The base Gradient⇒SpreadMethod field selects how the exterior fade behaves beyond the first cycle, where one cycle spans the Radius distance:

  • PAD (the default) fades once over the Radius distance and then stops, producing the classic glow or halo.
  • REPEAT tiles the fade outward as a sawtooth: at the end of each Radius cycle the alpha and colour restart at full strength, repeating until the parent area is filled.
  • REFLECT tiles the fade outward as a triangle wave: each cycle alternates direction, ramping the alpha back up from zero before fading again, repeating until the parent area is filled.

Setting OuterFall to GFALL::OPAQUE holds the exterior alpha at full strength rather than tapering it, so with REPEAT or REFLECT the full colour ramp is painted solidly out to the parent edge with no fade between tiles. Under PAD the alpha still cuts to transparent at the padding edge as usual.

This gradient operates exclusively in BOUNDING_BOX space. If Gradient⇒Units is set to USERSPACE it will be reset to BOUNDING_BOX during initialisation.

Structure

The GradientDistal class consists of the following fields:

Access
NameTypeComment
 FloorDOUBLEColour ramp floor for distal gradients.

The Floor value is used as the floor for distal gradient colour values. It has a valid range of 0 <= Floor < Multiplier; the constraint against Multiplier is enforced at initialisation.

 InnerFallINTSelects the alpha fall-off curve for the interior fade.

InnerFall controls the shape of the interior alpha fade that runs from the path outline inward to InnerRadius. The default is GFALL::SMOOTHSTEP. The fade is only visible when InnerRadius is non-zero; with a zero InnerRadius the interior remains fully opaque and the curve has no effect.

Setting InnerFall to GFALL::CLEAR disables the interior entirely, rendering it fully transparent irrespective of InnerRadius. This is useful for producing an exterior-only halo with no fill inside the path outline.

 InnerRadiusUNITThe size of the inner radius for distal gradients.

The InnerRadius defines the extent of the interior fade-out for distal gradients. If zero, the interior of the target shape is fully rendered.

 MultiplierDOUBLEColour ramp multiplier for distal gradients.

The Multiplier value acts as a multiplier for distal gradient colour values. It has a valid range of .01 < Multiplier < 10.

 OuterFallINTSelects the alpha fall-off curve for the exterior fade.

OuterFall controls the shape of the exterior alpha fade that runs from the path outline outward to the padding edge defined by Radius. The default is GFALL::SMOOTHSTEP. Faster curves such as GFALL::QUADRATIC and GFALL::CUBIC produce a tighter halo, while GFALL::SMOOTHSTEP holds the inner half bright for a wider glow.

Setting OuterFall to GFALL::CLEAR disables the exterior entirely, rendering it fully transparent so that only the interior half of the gradient is drawn.

 RadiusUNITExterior margin around the target path.

The Radius value controls how much exterior padding is added around the target path so that the exterior half of the signed distance colour ramp remains visible.

 XMLDefSTRINGReturns an SVG compliant XML string that describes the effect.
GradientDistal class documentation © Paul Manias © 2010-2026

GFALL Type

Gradient fall-off options.

NameDescription
GFALL::CLEARDisables the gradient.
GFALL::CUBICCubic fall-off - very tight glow hugging the outline.
GFALL::LINEARLinear fall-off (even taper).
GFALL::OPAQUENo fall-off.
GFALL::QUADRATICQuadratic fall-off - fast drop, thin tail — natural glow.
GFALL::SMOOTHSTEPSmoothstep fall-off - S-curve; brightest, holds the inner half.
GradientDistal module documentation © Paul Manias © 2010-2026