PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: drawing  (Read 414 times)

raymw

  • FireFly3 User
  • Senior Member
  • *
  • Posts: 219
drawing
« on: June 26, 2018, 01:38:54 PM »

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.
Logged

Jean-pierre Leroy

  • FireFly3 Registered User
  • Senior Member
  • *
  • Posts: 468
  • expect nothing, be prepared for everything ...
Re: drawing
« Reply #1 on: June 27, 2018, 05:21:15 AM »

« Last Edit: June 27, 2018, 05:22:52 AM by Jean-pierre Leroy »
Logged

raymw

  • FireFly3 User
  • Senior Member
  • *
  • Posts: 219
Re: drawing
« Reply #2 on: June 27, 2018, 06:31:04 AM »

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.
« Last Edit: June 27, 2018, 07:23:32 AM by raymw »
Logged

raymw

  • FireFly3 User
  • Senior Member
  • *
  • Posts: 219
Re: drawing
« Reply #3 on: July 04, 2018, 01:37:56 PM »

This is where I'm at with the setting up of the drawing side of things,
Code: [Select]
    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.
Logged