One way would be to place the 'solid' object as the background to the Canvas. Not really solid but the techniques in Creating Animated Apps can be used to make the pixels associated with the object behave like one. Additionally, you can check the pixel color of an area of the Canvas to determine whether a ball or a sprite attempts to land on or cross the boundary. A maze would be one application... have you checked the MIT Gallery for examples Find the Gold Maze App - Challenge Part
These examples may give you inspiration:
and
Do not understand.