PA_SetPictureInArray

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

version 2003


PA_SetPictureInArray (array; index; newPict; pictSize; info)

ParameterTypeDescription
arrayPA_VariableArray to access
indexlongIndex of the element to access
newPictvoid *Pointer to the new picture data
pictSizelongSize of the new picture in bytes
infoPA_PictureInfoBackground picture info

Description

The routine PA_SetPictureInArray sets the index element of the picture array array to picture.

Pass a pointer to the new picture data in picture, its size in size, and the PictureInfo in info.

Because 4th Dimension uses Macintosh Pictures internally, you must pass a pointer to a valid Macintosh Picture.

A Macintosh Picture starts with 5 short values that gives the size and the rectangle of the picture respectively. Under Windows, these 5 short values need to be byte swapped into the Windows byte order.

If array is not a eVK_ArrayPicture or if index is out of range, the routine does nothing.

Example

Initialize every element of a picture array to a special value, setting the PictureInfo to a default picture.

   void FillPictureArrayWith( PA_Variable arr, void *newPict, long size )
   {
      PA_PictureInfo   info = {0, 0, 0};
      long   count, i;
      count = PA_GetArrayNbElements( arr );
      for ( i = 1; i <= count; i++ )
         PA_SetPictureInArray( arr, i, newPict, size, info);
   }

See Also

PA_GetPictureHandleInArray, PA_GetPictureInArray, PA_SetPictureHandleInArray.

Error Handling

None.


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