SCE Graph

   Print  Previous  Next

Functions Provided By SCE Graph

The following table provides an overview over all functions the effect provides:

Function

Description

void SetBpm(int bpm)

Sets the speed for the movement. bpm must be within a range of 0 to 9999 BPM. E.g. a value of 60 means that it is moved one pixel per second into the given direction. The default value is 1200.

int GetBpm()

Returns the current speed for the movement of objects in BPM.

void SetDirection(int direction)

Sets the direction of the movement. Valid values for direction are DIR_LEFT, DIR_RIGHT, DIR_UP, and DIR_DOWN.

int GetDirection()

Returns the current effect direction.

void SetHeight(int value)

Sets the height (size) of elements. The default value is 10.

int GetHeight()

Returns the current height (size) of elements.

void SetHeightMax(int value)

Sets the maximum height of elements.

int GetHeightMax(int value)

Returns the current maximum height of elements.

void SetWidth(int value)

Sets the width (size) of elements. The default value is 10.

int GetWidth()

Returns the current width (size) of elements.

void SetWidthMax(int value)

Sets the maximum width of elements.

int GetWidthMax()

Returns the current maximum width of elements.

void SetPitch(int value)

Sets the distance between elements. The default value is 10.

int GetPitch()

Returns the currently used distance between elements.

void SetPitchMax(int value)

Sets the maximum distance between elements.

int GetPitchMax()

Returns the current maximum distance between elements.

void SetFrequency(int index,  float value)

Sets the rate of the graph function for mode 1, 2, or 3. Indexing (index) starts with 0. The default value is 1.

float GetFrequency(int index)

Returns the current frequency for mode 1, 2, or 3. Indexing (index) starts with 0.

void SetFrequencyMax(float value)

Sets the maximum frequency. A Distribution Mode should be activated first.

float GetFrequencyMax()

Returns the maximum frequency.

void SetPeak(int index, int value)

Sets the Peak for the graph function for mode 1, 2, or 3. Indexing (index) starts with 0. The default value is 50.

int GetPeak(int index)

Returns the current Peak for mode 1, 2, or 3. Indexing (index) starts with 0.

void SetShape(int shape)

Sets the shape for elements. One of the shapes (Defines) described below must be used.

int GetShape()

Returns the currently used shape for elements.

void SetColorMode(int mode)

Sets the color mode for the Color Table. One of the modes (Defines) described below must be used.

int GetColorMode()

Returns the current color mode for the Color Table.

void SetModeHeight(int mode)

Sets the Distribution Mode for Height. One of the modes (Defines) described below must be used.

int GetModeHeight()

Returns the current Distribution Mode for Height.

void SetModeWidth(int mode)

Sets the Distribution Mode for Width. One of the modes (Defines) described below must be used.

int GetModeWidth()

Returns the current Distribution Mode for Width.

void SetModePitch(int mode)

Sets the Distribution Mode for Pitch. One of the modes (Defines) described below must be used.

int GetModePitch()

Returns the current Distribution Mode for Pitch.

void SetModeFrequency(int mode)

Sets the Distribution Mode for Frequency. One of the modes (Defines) described below must be used.

int GetModeFrequency()

Returns the current Distribution Mode for Frequency.

void SetText(string text)

Sets the text for the shape Text. Example: SetText("MADRIX").

string GetText()

Returns the currently used text.

void SetRotation(int angle)

Rotates the text by multiples of 90°. Valid values for angle are 0, 90, 180, and 270.

int GetRotation()

Returns the current rotation of text.

void SetFontWidth(int value)

Sets the width of the font.

int GetFontWidth()

Returns the width of the currently used font.

void SetFontHeight(int value)

Sets the height of the font.

int GetFontHeight()

Returns the height of currently used font.

void SetFontItalic(int value)

Sets the font in italics (value = 1) or not (value = 0).

int GetFontItalic()

Returns if the font used is in italics.

void SetFontUnderline(int value)

Sets underlining for the font (value = 1) or not (value = 0).

int GetFontUnderline()

Returns if the currently used font is underlined.

void SetFontStrikeOut(int value)

Sets strikeout for the font (value = 1) or not (value = 0).

int GetFontStrikeOut()

Returns if the a strikeout font is used.

void SetFontWeight(int value)

Sets the weight of the font. Valid values for value range from 0 to 1000.

int GetFontWeight()

Returns the weight of the currently used font.

void SetFontFaceName(string name)

Sets which font to use. A maximum of 31 characters is allowed for string. Example: SetFontFaceName("Arial");

string GetFontFaceName()

Returns the name of the font currently in use.

void SetMode(int mode)

Sets the text mode. One of the modes (Defines) described below must be used.

int GetMode()

Returns the currently used text mode.

void SetContinuous(int enable)

Enables (enable = 1) or disables (enable = 0) continuous text ("Cont. Text") for the Text mode.

int GetContinuous()

Returns if continuous text is enabled (1) or not (0).

void SetGraphMode(int index, int mode)

Sets the trigonometric functions for the graph for mode 1, 2, or 3. Valid values for index are 0, 1, and 2. Indexing (index) starts with 0. One of the modes (Defines) described below must be used.

int GetGraphMode(int index)

Returns the currently used trigonometric mode for mode 1, 2, or 3. Valid values for index are 0, 1, and 2. Indexing (index) starts with 0.

void SetColor(int idx, color c)

Sets the color at the specified index in the Color Table dialog. If idx is out of range, nothing happens.

color GetColor(int idx)

Returns the color of the specified index in the color table. If the index is out of range, black is returned.

int GetColorCount()

Returns the number of colors in the color table.

void AddColor(int idx, color c)

Adds another color to the color table at the specified index position. If the index is lower or equal to 0, the new color is added to the first position. If the index is greater than the current number of colors, the new color is added at the end.

void RemoveColor(int idx)

Removes the color located at the specified index. If the given index is out of range, nothing happens. The Color Table of this effect needs to include at least 1 entry.

 

This Effect uses the Color Table. Learn more about Using Colors.

 

Trigonometric Functions

This effect uses four trigonometric functions. The function SetGraphMode can be used to change them. The following values can be used as parameter:

Value

Description

MODE_SINE

Selects the sine function.

MODE_COSINE

Selects the cosine function.

MODE_TRIANGLE

Selects the triangle function.

MODE_SQUARE

Selects the square function.

MODE_NONE

Deselects the trigonometric function.

 

Distribution Modes

Value

Description

MODE_UNIFORM

Selects a uniform distribution curve as function.

MODE_LINEAR

Selects a linear distribution curve as function.

MODE_QUADRATIC

Selects a quadratic distribution curve as function.

MODE_SQRT

Selects a square root distribution curve as function.

MODE_CUBIC

Selects a cubic distribution curve as function.

MODE_RANDOM

Selects a random distribution curve as function.

 

Shapes

This effect uses various geometrical figures. The function SetShape can be used to change them. The following values can be used as parameter:

Value

Description

DRAW_RECT

Selects the unfilled rectangle for drawing.

FILL_RECT

Selects the filled rectangle for drawing.

DRAW_CIRCLE

Selects the unfilled circle for drawing.

FILL_CIRCLE

Selects the filled circle for drawing.

DRAW_CROSS

Selects the cross for drawing.

DRAW_STAR

Selects the star for drawing.

DRAW_DIAMOND

Selects the unfilled diamond for drawing.

FILL_DIAMOND

Selects the filled diamond for drawing.

DRAW_RANDOM

Selects random shapes for drawing.

DRAW_TEXT

Selects the text mode.

 

Color Modes

Value

Description

CM_LOOP

Sets the loop mode. In this mode the effect loops through the colortable to select the colors for new shapes.

CM_SHUFFLE

Sets the shuffle mode. In this mode the effect selects the color for a new shape from the color table by random access.

CM_RANDOM

Sets the random mode. In this mode the colors for the shapes are generated by random but 10% of the colors will be generated by random access to the color table.

 

Text Modes

The Text shape of this mode supports different text modes. The given text can be interpreted as a whole sentence, as single words, or even single characters. With the function SetMode it is possible to set the mode with the following parameters:

Value

Description

MODE_SENTENCE

Sets the sentence mode.

MODE_WORD

Sets the word mode.

MODE_CHAR

Sets the character mode.