Parasol Framework
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Core
    • Display
    • Fluid
    • Font
    • Network
    • Vector
    • Audio
    • Sound
    • File
    • MetaClass
    • Module
    • StorageDevice
    • Task
    • Thread
    • Time
    • Compression
    • Config
    • Script
    • XML
    • Controller
    • BlurFX
    • ColourFX
    • CompositeFX
    • ConvolveFX
    • DisplacementFX
    • FilterEffect
    • FloodFX
    • ImageFX
    • LightingFX
    • MergeFX
    • MorphologyFX
    • OffsetFX
    • RemapFX
    • SourceFX
    • TurbulenceFX
    • WaveFunctionFX
    • Scintilla
    • ScintillaSearch
    • Bitmap
    • Clipboard
    • Display
    • Document
    • Font
    • Picture
    • Pointer
    • Surface
    • SVG
    • ClientSocket
    • HTTP
    • NetSocket
    • Proxy
    • Vector
    • VectorClip
    • VectorColour
    • VectorEllipse
    • VectorFilter
    • VectorGradient
    • VectorGroup
    • VectorImage
    • VectorPath
    • VectorPattern
    • VectorPolygon
    • VectorRectangle
    • VectorScene
    • VectorShape
    • VectorSpiral
    • VectorText
    • VectorTransition
    • VectorViewport
    • VectorWave

VectorWave Class

Extends the Vector class with support for sine wave based paths.

The VectorWave class provides functionality for generating paths based on sine waves. This feature is not part of the SVG standard and therefore should not be used in cases where SVG compliance is a strict requirement.

The sine wave will be generated within a rectangular region at (X,Y) with size (Width,Height). The horizontal center-line within the rectangle will dictate the orientation of the sine wave, and the path vertices are generated on a left-to-right basis.

Waves can be used in Parasol's SVG implementation by using the <parasol:wave/> element.

Structure

The VectorWave class consists of the following fields:

Access
NameTypeComment
  AmplitudeDOUBLEAdjusts the generated wave amplitude.

The Amplitude is expressed as a multiplier that adjusts the wave amplitude (i.e. height). A value of 1.0 is the default.

  CloseINTCloses the generated wave path at either the top or bottom.

Setting the Close field to TOP or BOTTOM will close the generated wave's path so that it is suitable for being filled.

  DecayDOUBLEDeclares a rate of decay to apply to the wave amplitude.

The amplitude of a sine wave can be decayed between its start and end points by setting the Decay field. Using a decay gives the wave an appearance of being funnelled into a cone-like shape. If the value is negative, the start and end points for the decay will be reversed.

  DegreeDOUBLEDeclares the initial angle (in degrees) to use when generating the wave.

The degree value defines the initial angle that is used when computing the sine wave. The default is zero.

Visually, changing the degree will affect the 'offset' of the generated wave. Gradually incrementing the value will give the wave an appearance of moving from right to left.

  DimensionsINTDimension flags define whether individual dimension fields contain fixed or scaled values.

The following dimension flags are supported:

NameDescription
FIXED_HEIGHTThe Height value is a fixed coordinate.
FIXED_WIDTHThe Width value is a fixed coordinate.
FIXED_XThe X value is a fixed coordinate.
FIXED_YThe Y value is a fixed coordinate.
SCALED_HEIGHTThe Height value is a scaled coordinate.
SCALED_WIDTHThe Width value is a scaled coordinate.
SCALED_XThe X value is a scaled coordinate.
SCALED_YThe Y value is a scaled coordinate.
  FrequencyDOUBLEDefines the wave frequency (the distance between each wave).

The frequency determines the distance between each individual wave that is generated. The default value for the frequency is 1.0. Shortening the frequency to a value closer to 0 will bring the waves closer together.

  HeightDOUBLEThe height of the area containing the wave.

The height of the area containing the wave is defined here as a fixed or scaled value.

  StyleINTSelects an alternative wave style.

NOT IMPLEMENTED

By default, waves are generated in the style of a sine wave. Alternative styles can be selected by setting this field.

  ThicknessDOUBLEExpands the height of the wave to the specified value to produce a closed path.

Specifying a thickness value will create a wave that forms a filled shape, rather than the default of a stroked path. The thickness (height) of the wave is determined by the provided value.

  WidthDOUBLEThe width of the area containing the wave.

The width of the area containing the wave is defined here as a fixed or scaled value.

  XDOUBLEThe x coordinate of the wave. Can be expressed as a fixed or scaled coordinate.

The x coordinate of the wave is defined here as either a fixed or scaled value.

  YDOUBLEThe y coordinate of the wave. Can be expressed as a fixed or scaled coordinate.

The y coordinate of the wave is defined here as either a fixed or scaled value.

VectorWave class documentation © Paul Manias © 2010-2025