How to read colors of background picture?

Hello all,

A LONG time ago, I think in the RB days, I wrote code that would allow me to resize an object on a canvas based on a black grid that is part of a picture underneath the object. Unfortunately I cannot find it and have not a clue how to do this in the latest 2022 R3.1 Xojo.

Basically what it did was to gradually increase the width/size of the object until it came up to a black line. Then it would stop and start increasing the height of an object until it came up to another black line.

The picture is static, the objects are placed over the picture and are moveable, resizable etc.

Any ideas how to do this again?

Thanks,
Tim

You can look at the pixels of a picture with RGBSurface https://documentation.xojo.com/api/graphics/rgbsurface.html