See Also Examples Applies To
Changes the pixel values contained into an area of the native GdPicture image from an array which contains long ARBG color values.
Syntax
object.SetPixelArray (*arPixels(), nDstLeft, nDstTop, nWidth, nHeight)
The SetPixelArray syntax has these parts:
| Part | Description |
| object | Required. An object expression that evaluates to an object in the Applies To list. |
| *arPixels() | Required. Input 1D or 2DLong Array. The array of ARGB pixel values. |
| nDstLeft | Required. Long. The left destination pixel of the area. |
| nDstTop | Required. Long. The top destination pixel of the area. |
| nWidth | Required. Long. The width of the destination area in pixel. |
| nHeight | Required. Long. The height of the destination area in pixel. |
Returns
Long. GdPictureStatus
Category
Pixel Access Functions
Visual Basic Sample
usage of GetPixelArray1D() and SetPixelArray() functions to apply negative effect on the native GdPicture image
Dim arPixel() As Long
Dim X As Long
Dim Y As Long
Call object.GetPixelArray1D(arPixel, 0, 0, object.GetWidth, object.GetHeight)
For X = 0 To object.GetWidth - 1
For Y = 0 To object.GetHeight - 1
arPixel((Y * object.GetWidth) + X) = Not arPixel((Y * object.GetWidth) + X)
Next Y
Next X
Call object.SetPixelArray(arPixel, 0, 0, object.GetWidth, object.GetHeight)