Hi all,
I'd like to develop an application that work with images.
The behaviour should be this :
the screen shows an images with only the borders of the image.
when you draw with a freehand movement on the image, it should show on the path that has been designed, the colors of the the second image behind the first (that is the same image but with colors), like a magic pen.
do you think I can load 2 identical images, the first without colors, the second with the colors.
hide the image with colors and show only the white image.
and using the bitmapextended library fills the missing colors with the functions :
I think a better way will be to use two panels overlaid on each other.
Draw the image in the back panel.
Draw a black/white rectangle on the front panel.
When the user draws on the front panel color it with colors.transparent
In that way the back image will be revealed.
thanks for the reply.
I'm trying to implement it, but panel.color sets the color for all the panel.
What I'd like to achieve is to color transparent a single point, not all background, so when I draw on the screen, the colored image seems to be drawed on the white one.
Dim c as Canvas
c.Initialize(panel)
Dim Rect1 As Rect
Rect1.Initialize(100dip, 100dip, panel.width-100dip, panel.height-100dip)
Canvas1.DrawRect(Rect1, Colors.Gray, True, 5dip)
panel.Invalidate
And then on touch you can draw a circle:
B4X:
c.DrawCircle(x, y, 20dip, Colors.Transparent, True, 1dip)
panel.Invalidate