PA_SetPictureHandleParameter


version 2003


PA_SetPictureHandleParameter (params; index; hpicture; info)

Parameter Type Description
params PA_PluginParameters Parameters received in PluginMain
index short Index of the parameter in params
hpicture PA_Handle New picture handle
info PA_PictureInfo Picture info (Background)

Description

The routine PA_SetPictureHandleParameter sets the value of the picture handle in the index parameter in params to hpicture .

Pass a handle to the new picture data in hpicture . This can be useful when you no longer need the handle since it will not be duplicated, as PA_SertPictureParameter does (which can lead to memory problems for "large" pictures).

The previous picture in the parameter is disposed.

See Create a new plug-in for a description of parameter accessors.

NOTE

:

The first parameter starts at index 1

Example

Change the picture of parameter whichParam under MacOS or Windows+Altura.

   void MySetPictureParameter(PluginParameters params, short whichParam)
   {
      PA_Handle   newPict;
      PA_PictureInfo   info = {0, 0, 0};
      newPict = GetResource('PICT', kMY_PACK_ID);
      Detachresource(newPict); // It is now a regular handle
      PA_SetPictureHandleParameter(params, whichParam, newPict, info);
   }

See Also

Create a new plugin , PA_SetPictureParameter .

Error Handling

None.