SCE Color Scroll

   Print  Previous  Next

Functions Provided By SCE Color Scroll

The following table provides an overview of all functions the effect can use:

Function

Description

void SetDirection(int direction)

Sets the scroll direction. Allowed are all DIR_ constants for directions and there are some additional directions  available, which are described below.

int GetDirection()

Returns the current scroll direction.

void SetCrossed(int enable)

Disables "cross mode" if enable is false, otherwise it will be enabled.

int GetCrossed()

Returns true if "cross mode" is enabled, otherwise false.

void SetBpm(int bpm)

Sets the bpm value of the effect. Valid values range from 0 to 9999.

int GetBpm()

Returns the currently set BPM value.

void SetPixelStepWidth(int width)

Sets the step value, which is the number of pixels the effect should scroll per frame using absolute values.

int GetPixelStepWidth()

Returns the step value.

void SetVectorStepWidth(float width)

Sets the step value, which is the number of pixels the effect should scroll per frame using relative values. The given value is relative to the current matrix size and the current direction. See below for further details.

float GetVectorStepWidth()

Returns the step value relative to the matrix size and scroll direction. See below for further details.

void SetPixelOffset(int offset)

Sets the offset in pixels, which means the width of the single stripes.

int GetPixelOffset()

Returns the offset value, the width of a stripe, in pixels.

void SetVectorOffset(float offset)

Sets the offset value relative to the matrix size and direction. See below for further details.

float GetVectorOffset()

Returns the offset relative to the matrix size and direction. See below for further details.

void SetRandom(int enable)

Enables or disables random mode.

int GetRandom()

Returns true if random mode is enabled, otherwise false.

void SetPixelRandValues(int min, int max)

Sets the random values in pixels.

int GetPixelMinRandValue()

Returns the minimum random value in pixels.

int GetPixelMaxRandValue()

Returns the maximum random value in pixels.

void SetVectorRandValues(float min, float max)

Sets the random values as values relative to the current matrix size and direction. See below for details.

float GetVectorMinRandValue()

Returns the minimum random value as value relative to the matrix size and direction. See below for details.

float GetVectorMaxRandValue()

Returns the maximum random value as value relative to the matrix size and direction. See below for details.

void SetPixelXOffset(int offset)

Sets the X-Offset in pixels.

int GetPixelXOffset()

Returns the current X-Offset in pixels.

void SetVectorXOffset(float offset)

Sets the X-Offset relative to the matrix size and direction. See below for details.

float GetVectorXOffset()

Retrieves the X-Offset relative to the matrix size and direction. See below for details.

void SetFade(int enable)

Enables the interpolation between two colors. If enable is true, interpolation will be enabled, otherwise disabled.

int GetFade()

Returns whether interpolation between two colors is enabled, or not.

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 with the specified index in the color table. If the index is out of range, black is returned.

int GetColorCount()

Returns the current 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 2 entries.

 

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

 

Using Relative Values

The relative values mentioned above, e.g. for SetVectorStepWidth, relate to the current direction and matrix size. For vertical and horizontal scroll directions, it is simple to understand. For horizontal (left, right) movements, the values relate to the matrix width and for vertical movements (up, down), the values relate to the matrix height.

For diagonal movements, e.g. to the upper left corner, the values relate to the higher value of either matrix width or height. For example, the size of the matrix is 40 pixels in width and 55 pixels in its height. Then, given values relate to the height with 55 pixels. This is due to the fact that it fits better than using the extent of the matrix diagonal.

 

Additional Scroll Directions

As you can see, this effect provides additional directions. Regarding vertical and horizontal movements, this refers to outside movement to the center or and movement from the center to the outside. They can be set with the function SetDirection using the following constants:

Value

Description

DIR_OUTWARDS_V

Sets a vertical outward movement (Vertical Explode).

DIR_INWARDS_V

Sets a vertical inward movement (Vertical Implode).

DIR_OUTWARDS_H

Sets a horizontal outward movement (Horizontal Explode).

DIR_INWARDS_H

Sets a horizontal inward movement (Horizontal Implode).

DIR_OUTWARDS_RECT

Sets a rectangular outward movement (Rectangle Explode).

DIR_INWARDS_RECT

Sets a rectangular inward movement (Rectangle Implode).

DIR_OUTWARDS_SQUARE

Sets a quadratic outward movement (Square Explode).

DIR_INWARDS_SQUARE

Sets a quadratic inward movement (Square Implode).

DIR_OUTWARDS_CIRCLE

Sets a circled outward movement (Circle Explode).

DIR_INWARDS_CIRCLE

Sets a circled inward movement (Circle Implode).

DIR_OUTWARDS_ELLIPSE

Sets an elliptic outward movement (Ellipse Explode). This is different to a circle on rectangular matrices. On quadratic matrices the ellipse will also be a circle.

DIR_INWARDS_ELLIPSE

Sets an elliptic inward movement (Ellipse Implode). This is different to a circle on rectangular matrices. On quadratic matrices the ellipse will also be a circle.