|
PixelRunLength | ||
Steps = PixelRunLength(StartX, StartY, StepX, StepY, MatchColour) | ||
Parameters: StartX = The Starting X position StartY = The Starting Y position StepX = X delta StepY = Y delta MatchColour = The RGB Colour your |
||
Returns: Steps = The number of matching pixels in this row |
||
The PixelRunLength() function finds the length of a run of pixels. FACTS: * PixelRunLength Scans the current surface and is clipped to only scan inside the viewport. * Important: PixelRunLength is lower level function. Unlike 99% of the other functions in PlayBASIC PixelRunLength doesn't include any surface locking and buffer seeding. Therefore, Before you can use PixelRunLength safely. You must lock the draw surface (LockBuffer), then it's highly recommended you read a pixel from this surface using Point(). This will ensure the address of the surface are seeded correctly internally for PixelRunLength Mini Tutorial: This example calculates the number of pixels (of the same colour) to the Top,Bottom, Left and Right of the mouse pointer.
This example would output.
|
Related Info: | Dot | FastDot | FastPoint | LockBuffer | Point : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |