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.
The VectorWave class consists of the following fields:
Access | Name | Type | Comment | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Amplitude | DOUBLE | Adjusts 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. | |||||||||||||||||||||
Close | INT | Closes the generated wave path at either the top or bottom. | |||||||||||||||||||
Setting the Close field to | |||||||||||||||||||||
Decay | DOUBLE | Declares 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. | |||||||||||||||||||||
Degree | DOUBLE | Declares 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. | |||||||||||||||||||||
Dimensions | INT | Dimension flags define whether individual dimension fields contain fixed or scaled values. | |||||||||||||||||||
The following dimension flags are supported:
| |||||||||||||||||||||
Frequency | DOUBLE | Defines 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. | |||||||||||||||||||||
Height | DOUBLE | The height of the area containing the wave. | |||||||||||||||||||
The height of the area containing the wave is defined here as a fixed or scaled value. | |||||||||||||||||||||
Style | INT | Selects 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. | |||||||||||||||||||||
Thickness | DOUBLE | Expands 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. | |||||||||||||||||||||
Width | DOUBLE | The width of the area containing the wave. | |||||||||||||||||||
The width of the area containing the wave is defined here as a fixed or scaled value. | |||||||||||||||||||||
X | DOUBLE | The 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. | |||||||||||||||||||||
Y | DOUBLE | The 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. |
Class Info | |
---|---|
ID | ID_VECTORWAVE |
Category | Graphics |
Include | modules/vectorwave.h |
Version | 1 |