AddEdgePixels

Declaration: TParticles.AddEdgePixels (PartIx: integer): integer;
The function AddEdgePixels adds a single-pixel margin around the edge of the specified particle. The particle to be grown is specified by the particle index PartIx (valid range: 1..NParticles). The function returns the particle index of the augmented particle (the particle index might change during the execution of AddEdgePixels, thus you have to take care of this if you apply AddEdgePixels several times).

Please note that the specified particle might touch another particle of the same class when growing it by a single-pixel margin. In this case both particles are combined into a single (larger) one and the returned value is the particle index of the combined particle. The original particles are removed.

The function returns the following error codes:

>0 ... everything is OK, the returned value is the particle index of the processed particle
-1 ... PartIx is out of range

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