Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Drawing semi and quarter circles  (Read 3897 times)

0 Members and 2 Guests are viewing this topic.

Wibbs

  • Newbie
  • *
  • Posts: 40
    • View Profile
Drawing semi and quarter circles
« on: October 18, 2010, 02:27:49 pm »
Hey all,

I am trying to work out the most efficient way of drawing semi and quarter circles, and was wondering if anyone had any suggestions.  I can obviously draw a custom shape and set points manually, but would much prefer a cleaner method if one exists.

Thanks in advance,

Phil

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Drawing semi and quarter circles
« Reply #1 on: October 18, 2010, 02:43:44 pm »
If you want a geometry based solution, I think this is the cleanest one.

Otherwise, if you don't care using an image based method, you can use a sprite displaying a circle, and play with the subrect to draw only a part of it.
Laurent Gomila - SFML developer

Wibbs

  • Newbie
  • *
  • Posts: 40
    • View Profile
Drawing semi and quarter circles
« Reply #2 on: October 18, 2010, 06:32:09 pm »
Cool,

Thanks for your reply. I'm trying to avoid the use of images if possible, and have it working now.

Thanks,

Phil

 

anything