BASIC

Author Topic: 2D graphics primitives  (Read 2026 times)

Offline Elemee

  • Mc. Print
  • *
  • Posts: 4
    • View Profile
2D graphics primitives
« on: 2015-Nov-17 »
I am new to GLB, was working in SiMPLE where there are graphics primitives like "solidcircle()" and built in support for drawing ellipses etc.  Is there no 2D support in GLB for anything more than line or rectangle?  If you need a circle, do you have to use other software to create it (as a sprite)?

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4234
    • View Profile
    • Portfolio
Re: 2D graphics primitives
« Reply #1 on: 2015-Nov-17 »
You can create functions to build any shape you desire and they will work similar to commands, I think there are many examples around the forum.
But you better wait for a more pro answer here. :good:

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10715
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: 2D graphics primitives
« Reply #2 on: 2015-Nov-17 »
Search the forum in code snippets. It's all there

Offline Elemee

  • Mc. Print
  • *
  • Posts: 4
    • View Profile
Re: 2D graphics primitives
« Reply #3 on: 2015-Nov-19 »
Thanks Kitty Hello and erico for replying and directing my attention where it needed to go.  I did find what I was looking for.  I had assumed there was a library of drawing functions, but it is less formal than that, and now that I understand how this works I can proceed with moving my project over to GLB.  I'm sure I'll call for help again one of these days.  In the meantime, thanks again.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4234
    • View Profile
    • Portfolio
Re: 2D graphics primitives
« Reply #4 on: 2015-Nov-19 »
All fine Elemee, let us know what you are looking to acomplish. :good:

Yep, there is no standard lib, each user can create them as they see fit.
You might also want to look at the POLYVECTOR commands, it may come usefull.

Welcome aboard!

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Re: 2D graphics primitives
« Reply #5 on: 2015-Dec-07 »
I had assumed there was a library of drawing functions, but it is less formal than that ...

By assumption there are many, as we all have our own developed type libraries over time and so I suggest you do that to. A "solid circle" (which does not exist) is really a disc, so by interpretation it can't be a fixed GLBasic command due to vague term.