|
![]() |
![]() |
version 2003
PA_SetPictureVariable (aVariable; newPicture; pictSize; info)
Parameter | Type | Description | |
aVariable | PA_Variable * | → | Pointer to the variable to access |
newPicture | void * | → | Data of the new picture |
pictSize | long | → | Picture size in bytes |
info | PA_PictureInfo | → | Picture info |
Description
The routine
PA_SetPictureVariable
sets the content of the variable pointed to by
aVariable
to the data pointed to by
newPicture
.
Pass a pointer to the data of the picture in
newPicture
, the size in bytes of the picture in
pictSize
, and picture info in
info
(used when the picture is in the background).
WARNING
The kind of of the variable pointed to by
aVariable
is set to
eVK_Pictureb
by the routine, even if it was not its previous kind.
Make sure that you do not change 4D variable kinds (using
PA_GetVariable
), especially in compiled mode.
Note that
PA_SetPictureVariable
duplicates
newPicture
, which still belongs to the plug-in after the call. To give the data without duplicating it, use
PA_SetPictureHandleVariable
.
Example
Wrapper that checks the kind and uses empty picture info.
void mySetPictureVariable(PA_Variable *v, void *p, long s)
{
if(PA_GetVariableKind(*v) == eVK_Picture)
{
PA_PictureInfo info = {0, 0, 0};
PA_SetPictureVariable(v, p, s, info);
}
}
See Also
Error Handling
keeps the last error that occurred
before
calling the routine.