L_VecSetAmbientColor
#include "lvkrn.h"
L_INT EXT_FUNCTION L_VecSetAmbientColor(pVector, Color)
pVECTORHANDLE pVector; |
/* pointer to a vector handle */ |
COLORREF Color; |
/* the new ambient color */ |
Sets the ambient (room) light used when drawing a vector image.
Parameter |
Description |
pVector |
Pointer to a vector handle. |
Color |
The RGB value of the ambient light to set. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
This function will only be effective if the use of lights has been enabled using L_VecSetUseLights.
The default ambient color is white (RGB(255, 255, 255)).
This function has no effect in the GDI engine.
Required DLLs and Libraries
LVKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
Example
/* This example will decrease the ambient color to half */
void HalfAmbient( pVECTORHANDLE pVector )
{
COLORREF OldColor; /* Current ambient color */
COLORREF NewColor; /* New ambient color */
/* Get current ambient color */
OldColor = L_VecGetAmbientColor( pVector );
/* Half the color */
NewColor = RGB( GetRValue( OldColor ) / 2,
GetGValue( OldColor ) / 2,
GetBValue( OldColor ) / 2 );
/* Set new ambient color */
L_VecSetAmbientColor( pVector, NewColor );
}