Time for action – testing a getPixel function
Before getting to useful examples, let's make a
getPixel function, and a quick test case.
- Make a new Mainstack. Save it as
We'll use the same stack to illustrate several things, and at the end we may dare to try it on a mobile device!
- Make the stack of the size of your largest test device. Or just try 1024x768 if you'll use the iPad Simulator.
- From the File menu, choose Import as Control/Image, and select any small image file you have, to place it in the upper left-hand side corner of the card window. The example shown below uses a LiveCode logo image.
- Place a new Graphic object next to the image. It's going to be showing a single color, so just make it big enough to easily see the color. ...