Apply a definitive special effect on a registered font.
int OkfApplyEffect( int handle, OKFEFFECTTYPE type, int color, int intensity );
Routine | Required Header |
OkfApplyEffect | "okf.h" |
Libraries
OKLIB.A | Oankali's GP32 run-time library |
Return Value
In case of success OkfApplyEffect returns 0, otherwise it returns -1. Look at okf.lastError for details on what happened.
Parameters
handle
The handle of the font on which the special effect has to be applied. The handle must belong to a valid registered font.
type
An OKFEFFECTTYPE value that indicates the type of the special effect to apply.
color
The color to use for the special effect to be applied.
intensity
The intensity of the special effect to be applied. Value range from 0 to 31.
Remarks
The OkfApplyEffect function applies type special on all pixels of a font bitmap. The modification is permanent. The intensity argument is only used for okfOverlay special effect type.
This function is used to change permanently the color of an OKF Font at the beginning of the program. That can be helpful when the rendering of the font has to be as quick as possible. Real-time special effects can be very time consuming.
Use OkfClone function to make a copy of the font, in case the original font is also needed in the program.
Example
|
See Also
OKF Font Engine Routines, OKF Font Engine Constants, OkfClone