Thread: Implementing simple vector graphics capability

  1. #1
    Registered User
    Join Date
    Dec 2005

    Implementing simple vector graphics capability

    Hi everyone,

    How do you think i could use one type of structure to define a range of shapes (like line, circle, rectangle, triangle).

    What things do they have in common and what special info i might need for some of them.

    How could i make a single drawing func that draw all the shapes.

    I am using MS visual c as a compiler. Help would be much appreciated.

    Thank you

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    void drawshape( struct shape *s )
        /* your code here... */
    I did the hard part, I'll leave the easy bits for you.

    Hope is the first step on the road to disappointment.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Binary Search Trees Part III
    By Prelude in forum A Brief History of
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  2. Simple simple program
    By Ryback in forum C++ Programming
    Replies: 10
    Last Post: 09-09-2004, 05:48 AM
  3. Help me with these simple programs
    By Help me in forum C Programming
    Replies: 4
    Last Post: 11-08-2001, 10:38 AM
  4. Need help with simple data types
    By partnole in forum C++ Programming
    Replies: 1
    Last Post: 10-03-2001, 08:36 AM
  5. Linker errors with simple static library
    By Dang in forum Windows Programming
    Replies: 5
    Last Post: 09-08-2001, 09:38 AM