hello, I wrote a program where I drawing 2 lines and read the images. first I draw a first line from x=6 and y=6 to x=517 and y=517 then I call function read_pixel then I call funftion clear_area then I draw a second line x=6 and y=517 to x=517 and y=6 then I call function read_pixel But after that in the DrawingArea the first line AND second line is inside (at read_pixel) Why function clear_area do not work? have anybody an idea what happens? kind regards
STATIC PRIVATE sifig AS Image PUBLIC SUB clear_area() DIM x AS Integer DIM y AS Integer DrawingArea1.BackColor = 0 DrawingArea1.ForeColor = 0 DrawingArea1.Clear Draw.Begin(DrawingArea1) Draw.Transparent = FALSE Draw.FillStyle = 1 Draw.LineStyle = 1 Draw.BackColor = 0 Draw.ForeColor = 0 FOR x = 6 TO 517 STEP 1 FOR y = 6 TO 517 STEP 1 Draw.Point(x, y) NEXT NEXT Draw.End DrawingArea1.Refresh WAIT END PUBLIC SUB read_pixel() DIM x AS Integer DIM y AS Integer DIM f AS Integer FOR y = 6 TO 517 STEP 1 FOR x = 6 TO 517 STEP 1 f = sifig[x, y] NEXT NEXT END Draw.Begin(DrawingArea1) Draw.Transparent = FALSE Draw.FillStyle = 1 Draw.LineStyle = 1 Draw.ForeColor = &H0000FF Draw.Line(6, 6, 517, 517) Draw.End DrawingArea1.Refresh WAIT sifig = DrawingArea1.Grab().Image read_pixel clear_area Draw.Begin(DrawingArea1) Draw.Transparent = FALSE Draw.FillStyle = 1 Draw.LineStyle = 1 Draw.ForeColor = &H0000FF Draw.Line(6, 517, 517, 6) Draw.End DrawingArea1.Refresh WAIT sifig = DrawingArea1.Grab().Image read_pixel -- View this message in context: http://www.nabble.com/DrawingArea-Problem-tp23817487p23817487.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user