SCE Gradient

   Print  Previous  Next

Functions Provided By SCE Gradient

This effect uses the following functions:

This Effect uses Directions. Learn more »Using Directions
This Effect uses the Color Gradient. Learn more »Using Color Gradient
This Effect uses Look-At Types. Learn more »Using Look-At Types

 

Function

Description

void SetAngle(int value)

Sets the Angle value in degrees.

float GetAngle()

Returns the Angle in degrees.

void SetCrossWidth(float value)

Sets the Cross Width value using percentage values.

float GetCrossWidth()

Returns the Cross Width in percentage.

void SetPixelCrossWidth(int value)

Sets the Cross Width value using pixel values.

int GetPixelCrossWidth()

Returns the Cross Width in pixels.

void SetCrossAxes(int value)

Sets the Cross Axis value. See below for a list of constants.

int GetCrossAxes()

Returns the Cross Axis. See below for a list of constants.

 

Cross Axis Constants

Constant

Description

int AXIS_ONE

Sets the direction cross mode to Axis 1.

int AXIS_TWO

Sets the direction cross mode to Axis 2.

int AXES_ONE_AND_TWO

Sets the direction cross mode to Axes 1 And 2.

 

MADRIX 2.X To MADRIX 3.X Migration Hints

The MADRIX 2.X effect SCE Color Ramp has been renamed to SCE Gradient in MADRIX 3.X. The following functions and constants are not supported anymore. Please follow the hints to migrate your macros.

Function/Constant

Description

void SetCrossed(int enable)

Use SetDirectionCrossMode(int value) instead.

int GetCrossed()

Use GetDirectionCrossMode() instead.

 

Example

This macro sets the direction to DIRECTION_RADIAL when the effect is started. Before the effect is rendered, the angle will be increased by 1 until 360 degrees is achieved. Then, it starts again with 0 degrees. As a result, the effect looks like a rotating radial gradient.

@scriptname="Radial Gradient - Rotated";

@author="inoage GmbH";

@version="";

@description="";

 

int degree;

 

void InitEffect()

{

 SetDirection(DIRECTION_RADIAL);

 degree = 0;

}

 

void PreRenderEffect()

{

 degree = (degree+1)%360;

 SetAngle(degree);

}

 

void PostRenderEffect()

{

 

}

 

void MatrixSizeChanged()

{

 InitEffect();

}

 

MADRIX Version: 3.6j | Script Version: 2.22
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%
Print   Previous   Next