BBO Discussion Forums: Any C/C++ Windows programmers here? - BBO Discussion Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Any C/C++ Windows programmers here? Need a simple graphics library

#1 User is offline   helene_t 

  • The Abbess
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 17,397
  • Joined: 2004-April-22
  • Gender:Female
  • Location:Odense, Denmark
  • Interests:History, languages

Posted 2009-November-25, 09:10

I am writing some stuff for my work and need very simple graphics routines. Something like:

#include<simplegraphicslib.h>

main() {
GraphicsBuffer *mybuffer = makeGraphicsBuffer (100,100,colors16);
rect (mybuffer, 0,0,33,99, blue);
rect (mybuffer, 34,0,66,99, white);
rect (mybuffer, 67,0,99,99, red);
writeGraphicsBuffer (mybuffer, "frenchflag.png");
}

Any suggestions? Could also be useful for making pictures for birthday greetings.
The world would be such a happy place, if only everyone played Acol :) --- TramTicket
0

#2 User is offline   hotShot 

  • Axxx Axx Axx Axx
  • PipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 2,976
  • Joined: 2003-August-31
  • Gender:Male

Posted 2009-November-25, 09:51

I haven't used these, but perhaps this helps:

http://pngwriter.sourceforge.net/ (as your example creates a png)

Or pick on on the other C/C++ libraries from here:

http://www.freeprogr...com/imglib.html
0

#3 User is offline   helene_t 

  • The Abbess
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Advanced Members
  • Posts: 17,397
  • Joined: 2004-April-22
  • Gender:Female
  • Location:Odense, Denmark
  • Interests:History, languages

Posted 2009-November-25, 10:04

Thanks HotShot, pngwriter looks very easy to use.

Also thanks to Csaba for suggesting Gd, slightly more complex but still easy to use, supports more file formats. http://gnuwin32.sour...packages/gd.htm
The world would be such a happy place, if only everyone played Acol :) --- TramTicket
0

#4 User is offline   MattieShoe 

  • PipPipPipPip
  • Group: Full Members
  • Posts: 160
  • Joined: 2009-September-04

Posted 2009-November-29, 04:32

gd is nifty.

I haven't done much graphics in C/C++, but XNA uses C# and has some very simple and very powerful stuff, and the IDE/compiler is free from Microsoft. I did some silly simple code for effecient circle packing with it for fun.
Posted Image
Took very little time to code. You can use image files like pngs, place them, scale them, rotate them, adjust their transparency, use antialiased fonts, etc. Pretty slick.

I made a little boids program with it too, just to familiarize myself with it
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users