Help with drawing a shape in a window

This is a discussion on Help with drawing a shape in a window within the C++ Programming forums, part of the General Programming Boards category; Just for fun I am making a program to draw shapes in a window but not usin OpenGL or anything ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    118

    Help with drawing a shape in a window

    Just for fun I am making a program to draw shapes in a window but not usin OpenGL or anything like that. Here is what I got so far. I know its crap you can only draw a 5 * 5 rectangle because I couldent figure out how to work with pointers. Any ways what I really want is to make the DrawRecta function to put pixels to fully cover the whole rectangle but I have no idea how to do that, any ideas? you might even have fun!
    Why drink and drive when you can smoke and fly?

  2. #2
    Registered User
    Join Date
    Jan 2003
    Posts
    118
    forgot the attachment...
    Here it is
    Attached Files Attached Files
    Why drink and drive when you can smoke and fly?

  3. #3
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    Polygon() is a function that will do that for you in one call.

    edit: Never mind, I thought I was in the windows forum for a minute.

    Basically you're looking for rasterizing of a polygon. For convex, that's easy. For concave, it'll require more thought. I've got an excellent concave polygon rasterizing algorithm that I wrote, but unfortunately it is the property of the company now
    Last edited by FillYourBrain; 08-21-2003 at 02:23 PM.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C or C++
    By AcerN30 in forum Game Programming
    Replies: 41
    Last Post: 05-30-2008, 07:57 PM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 09:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  4. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  5. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 01:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21