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

VectorTransition Class

Transitions are used to incrementally apply transforms over distance.

The VectorTransition class is used to gradually transform vector shapes over the length of a path. This feature is not SVG compliant, though it can be utilised from SVG files via the 'kotuku:' name space.

The transition is defined as a series of stops and transform instructions, of which at least 2 are required in order to interpolate the transforms over distance. The transform strings are defined as per the SVG guidelines for the transform attribute.

The following example illustrates the use of a transition in SVG:

<defs>
    <kotuku:transition id="hill">
      <stop offset="0" transform="scale(0.3)"/>
      <stop offset="50%" transform="scale(1.5)"/>
      <stop offset="100%" transform="scale(0.3)"/>
    </kotuku:transition>
  </defs>

  <rect fill="#ffffff" width="100%" height="100%"/>
  <text x="3" y="80" font-size="19.6" fill="navy" transition="url(#hill)">This text is morphed by a transition</text>

Transitions are most effective when used in conjunction with the Vector⇒GuidePath feature.

Structure

The VectorTransition class consists of the following fields:

Access
NameTypeComment
 Stopskt::vector<Transition>Defines the transforms that will be used at specific stop points.

A valid transition object must consist of at least two stop points in order to transition from one transform to another. This is achieved by setting the Stops field with an array of Transition structures that define each stop point with a transform string. The Transition structure consists of the following fields:

FieldTypeDescription
OffsetDOUBLEAn offset from 0.0 to 1.0 at which to apply the transform.
TransformSTRINGA transform string, as per SVG guidelines.
 XMLDefSTRINGReturns an SVG compliant XML string that describes the transition.

The returned XML defines the transition's stop list as <stop/> elements, excluding the wrapping <kotuku:transition/> element and id attribute.

VectorTransition class documentation © Paul Manias © 2010-2026

Transition Structure

For VectorTransition definitions

FieldTypeDescription
OffsetDOUBLEAn offset from 0.0 to 1.0 at which to apply the transform.
TransformSTRINGA transform string, as per SVG guidelines.
VectorTransition class documentation © Paul Manias © 2010-2026