• Welcome to PlanetSquires Forums.
 

drawing

Started by raymw, June 26, 2018, 01:38:54 PM

Previous topic - Next topic

raymw

Does any one have any basic information/help on drawing lines using firefly/freebasic? I had a quick look through the forum, but only found something called firelines iirc, from some years ago.

Initially, I only want to plot xy points, and draw lines between said points, but soon I'll need to do 3d, possibly with rendering.
I have no idea on where to start, but in the past I managed OK with c# and visual studio.
Maybe just an example of drawing a couple of lines on a form could get me started.
Thanks in anticipation.

Jean-pierre Leroy

#1

raymw

#2
Thanks, but the code would need converting for free basic. I'm OK with the logic/drawing side of things, (I didn't realise much of it was built into freebasic), it was more a problem of the geometry of the screen area, how it was laid out, etc.  I guess now I need to  just find a good way of setting up the screen, maybe need a custom control in firefly.

raymw

This is where I'm at with the setting up of the drawing side of things,     Screenres(1200,800,32)       
     Color  RGB(0,0,0) , RGB(255,255,255)   'white screen
     Cls 
     
 

and then I do the line drawing using the freebasic built in commands. This works OK.. I use the odd screen resolution, since any of the standard resolutions, if I click the full screen icon on the top right frame,  needs  the '3 fingered salute' to get out of it (that then lets me close the program via task manager). I guess I can set some flags to prevent this. As yet I've not sussed out how to close said window, the top right 'X' on the frame has no visible effect. It may be as well to open the graphics screen in a new ff form, and then I could close the form, and hopefully the graphics screen would be closed as well.