PA_SetPictureHandleParameter

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_SetPictureHandleParameter (params; index; hpicture; info)

ParameterTypeDescription
paramsPA_PluginParametersParameters received in PluginMain
indexshortIndex of the parameter in params
hpicturePA_HandleNew picture handle
infoPA_PictureInfoPicture 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.


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next