SCE Bitmap |
Print Previous Next |
Functions Provided By SCE Bitmap The following table provides an overview of all functions the effect can use:
This Effect uses the Color Picker. Learn more about Using Colors.
Deprecated Functions
Speed Settings Of The Bitmap Effect The bitmap effect has two independent speed settings implemented. The first one is the movement speed of the picture moving over the matrix. The second one is the animation speed used to speed up or slow down the animation. The following functions specify and retrieve the speed for the picture movement in frames per second:
The next two functions control the animation speed:
The functions do not control the animation speed itself, but work with a multiplier. This means that if mulitplier is set to 2 for example, the animation speed is doubled. A multiplier of 0.5 is setting the animation speed to half of the original one. Examples Moving An Image The following example moves the image or animation back and forth on the matrix. void InitEffect() {
}
void PreRenderEffect() { if(GetDirection() == DIR_LEFT) { if(GetVectorImagePositionX() <= 0.0) { SetVectorImagePosition(0.0, GetVectorImagePositionY()); SetDirection(DIR_RIGHT); } } else if(GetDirection() == DIR_RIGHT) { if(GetVectorImagePositionX() + GetVectorImageWidth() >= 1.0) { SetVectorImagePosition(1.0 - GetVectorImageWidth(), GetVectorImagePositionY()); SetDirection(DIR_LEFT); } } else { SetDirection(DIR_LEFT); }
}
void PostRenderEffect() {
}
Controlling The Animation The following example stops the animation and selects the images to show. @scriptname=""; @author=""; @version=""; @description="";
int g_img;
void InitEffect() { WriteText(GetAnimationSpeed()); SetAnimationSpeed(0.0); }
void PreRenderEffect() { SetCurrentImage(g_img); g_img = (g_img + 1) % GetImageCount(); }
void PostRenderEffect() {
}
|