PartImgData

Declaration: TParticles.PartImgData[ClsIx: integer]: TInt2DArray;
The array property PartImgData provides read-only access to the particle image data. The particle data are organized in NClasses layers, each layer representing one particle class. The parameter ClsIx is the class index (1...NClasses), the returned particle image data contain zero values for all pixels which are not part of any particle, all other pixels (those which belong to particles of the selected class) contain non-zero values reflecting the particle index. The particle index can be used to access the particle parameters via the array ParticleParams.

If ClsIx holds an invalid value the returned array is empty (all zero pixels).

Hint 1: Please note that the size of the particle image data cannot be set explicitly. The size is implicitly determined by either the method AddNewClass or by the method AnalyseAndAppend. However, you can query the size of the particle image by using the readonly properties PartImgSizeX and PartImgSizeY.

Hint 2: In order to access the particles currently loaded in the particle editor you can use the pre-declared global variable PEData.