This is what I did:
First, set properties dX and dY as Integers and cardPic as Picture.
Following is all in the canvas methods:
Make sure cardPic is as big as the canvas:
Open cardPic = NewPicture( Me.Width, Me.Height, 32 )
To avoid flickering under other platforms:
Paint g.DrawPicture( cardPic, 0, 0 )
For the paint brush:
MouseDown MouseDrag cardPic.Graphics.DrawLine dX, dY, X, Y
dX = X
dY = Y
Refresh
Paint bucket is fairly simple:
MouseDown cardPic.RGBSurface.FloodFill( X, Y, color )
That's the simple stuff I can come up with right now.