#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    Angry GdImageStringFTCircle() need help!


    I'm sorry if this has already been posted or I am breaking forum rules posting this but the website wouldn't let me search the forum... :mad:

    I am using C to program a roulette wheel for my coursework project and I need the numbers to follow the wheel in a circle while being rotated. I figured this function: gdImageStringFTCircle
    would be perfect however I cannot get it to work at all, not even an error message appears just nothing displays. I really need professional help, I am new to C and don't understand why it doesn't work. My lecturer rather than helping me just asks why me why it's not working... :mad:

    So please anyone out there that can help me make this function work then it would be amazing. Sorry for breaking any rules once again. I will paste a segment of my current program to fault find etc.


    gdImageStringFTCircle(
    RouletteWheel,
    320,
    360,
    550,
    400,
    0.8,
    "vera.ttf",
    24,
    "top text",
    "bottom text",
    White);


    Thanks again!
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,366
    Rep Power
    1870
    You mean this one?
    http://www.boutell.com/gd/manual2.0....StringFTCircle
    My first suggestion would be for you to copy/paste the example code on that website to verify that it works.

    Then I would suggest you substitute your known parameters (from your current code) one at a time until you see it break.

    Then you'll know what to fix in your code.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0

    I've tried that...


    :confused:
    The code on that link is wrong, the function has a typo in it and the code is requesting a file which I do not have to be compared.

    I have scanned google for lots of solutions and found none. :( Thank you for the reply.
  6. #4
  7. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,366
    Rep Power
    1870
    > the function has a typo in it
    And?
    If you can't manage to fix a typo, you shouldn't be programming.
    You seem to at least know there is a typo, so what's the difficulty?

    > and the code is requesting a file which I do not have to be compared.
    And?
    They're just image files, surely you can rummage up a couple of image files from somewhere.
    Surely you can Photoshop / GIMP / paint your way to some test file you can use.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    3
    Rep Power
    0
    Fixing the typos and without having to deal with the images etc surely the function should just work on it's?

IMN logo majestic logo threadwatch logo seochat tools logo