New topic: RGBsurface
<http://forums.realsoftware.com/viewtopic.php?t=30474> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message brisance Post subject: RGBsurfacePosted: Wed Oct 14, 2009 5:56 am Joined: Tue Oct 06, 2009 2:38 am Posts: 5 Need to draw a line that tracks the user's cursor when it enters the canvas. Here is the code in the Canvas's MouseMove event handler: Code:me.graphics.DrawPicture(Canvas1.pic,0,0) me.graphics.DrawLine(x,0,x,me.height) Now for the sake of learning how to use RGBSurface, I wish to achieve the same functionality. Code:dim surf As RGBSurface dim p As Picture dim i As Integer p = NewPicture(me.width,me.height,32) p = Canvas1.pic surf = p.RGBSurface for i = 0 to me.height surf.Pixel(x,i) = &c000000 next me.graphics.DrawPicture(p,0,0) What happens is that my picture ends up with multiple lines. Can someone explain why? Thanks! Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
