2D Graphics Library

This is a discussion on 2D Graphics Library within the C++ Programming forums, part of the General Programming Boards category; I have written a program that gathers information on nodes on an IP network. Information such as 1)IP Address 2) ...

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    6

    2D Graphics Library

    I have written a program that gathers information on nodes on an IP network. Information such as

    1)IP Address
    2) Open ports
    3) IP hops to node
    4) Delay on the hops

    I have also grouped the nodes together according to their subnets and have also written a piece of code which determines which nodes are most likely switches/routers/gateways etc. All of this is still far from perfect and plenty of holes, but this is not what my question is a bout, and was just trying to add some context.

    I would like to now produce a 2D representation of this information. A sort of network map with additional information (link delays, open ports etc). I would also like to export the image into a graphics format such as gif/png etc.

    What library can you guys recommend me to make use of ?

    I have very little experience with graphics, but given the right library that can do what i need it to do i am sure i can figure it out.

    All help is appreciated !

    Thanks,

    Evilpopcorn

  2. #2
    Village id10t
    Join Date
    May 2008
    Posts
    57
    Free Graphics Libraries - freeprogrammingresources.com seems to have a bunch of 2d graphic libraries for c++. I've never done graphics, so that is about as much help as I can offer. Good luck

  3. #3
    Registered User
    Join Date
    Jul 2009
    Posts
    9
    You might want to try allegro, I've been using it for a long time, and it's managed to do everything that I want out of it as far as 2D graphics goes.
    www.allegro.cc
    Last edited by Raptoricus; 08-06-2009 at 10:58 PM. Reason: edited to make the link more clear

  4. #4
    a newbie :p
    Join Date
    Aug 2008
    Location
    Zurich, Switzerland, Switzerland
    Posts
    91
    well let's see...

    to display the data you might need nice GUI...
    are you using microsoft product with it's MFC... check on codeproject.com.. there are plenty of nice graphic library based on this MFC....

    if you are not using microsoft product, let's say Linux with Qt or wxWidgets environment, I think they have their own graphic library bundled together... this wxWidgets is very nice, i have tried...

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    6
    I am programming in windows using .NET but i have not written it in MFC so i believe i would have LOTS of issues with trying to port it over to a Form class.

    Quicly read thru the wxWidgets link and look like a nice way to generate my user interface, but does it help me "draw" my network image?

    I was thinking at first "drawing" my network map and then later using a GUI library to just load that image.

    Will look thru the above links later today.
    Last edited by Evilpopcorn; 08-07-2009 at 01:54 AM.

  6. #6
    a newbie :p
    Join Date
    Aug 2008
    Location
    Zurich, Switzerland, Switzerland
    Posts
    91
    check here : CodeProject: A flexible charting library for .NET. Free source code and programming help

    practically if you are using .net, you don't need another lib for GUI...

  7. #7
    Ugly C Lover audinue's Avatar
    Join Date
    Jun 2008
    Location
    Indonesia
    Posts
    489
    I would recommend Qt, it has awesome painting engine AND easy way to paint.

    It easier than wxWidgets, GTK, or other 2D graphics library because of its instaneous installer -- just install and use, no complicated cofiguration, compilation and integration.

    It also support printing and saving graphics context (anything drawn on the screen) feature which likely you need.
    Just GET it OFF out my mind!!

  8. #8
    Registered User
    Join Date
    Aug 2009
    Posts
    6
    I merged my code to work now with the .NET interface and can make use of the forms class.

    So now looking for a 2 library to "paint" my network topolgy.

    Gonna look now at that link of auralius.

    Any more ideas would be great!

  9. #9
    a newbie :p
    Join Date
    Aug 2008
    Location
    Zurich, Switzerland, Switzerland
    Posts
    91
    good... making some progress...

    just find with keyword: c#.net chart
    may be u can ask in .net forum...
    c++ programmer is a bit sensitiv with this .net technology since sometimes we can not find a reason why we should use it...

  10. #10
    Registered User
    Join Date
    Aug 2009
    Posts
    6
    I looked at that link and by the looks of that its just for creating graphs which is not want i want.

    Ideally i would like to draw a map of my network topology. Place icons (or even just squares) that i can then link up with lines accordingly. Then if i could label the host and links would be great.
    Last edited by Evilpopcorn; 08-12-2009 at 04:47 PM.

  11. #11
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    Quote Originally Posted by audinue View Post
    I would recommend Qt, it has awesome painting engine AND easy way to paint.

    It easier than wxWidgets, GTK, or other 2D graphics library because of its instaneous installer -- just install and use, no complicated cofiguration, compilation and integration.

    It also support printing and saving graphics context (anything drawn on the screen) feature which likely you need.
    i also recommend this

  12. #12
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Have a look at Graphviz and "dot" files. It's a very simple system for describing relationships between objects and outputting professional looking charts. There may also be libraries for doing this internally in your C++ program. You basically just specify the types of nodes, and in what style they should be displayed, and then you name all the nodes and the links between them (which is what you have). I use it at work to automatically generate UML diagrams all the time.

  13. #13
    Registered User
    Join Date
    Aug 2009
    Posts
    6
    Thanks Sean ! This looks like it will work for me !

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need simple C graphics library
    By Sharke in forum C Programming
    Replies: 4
    Last Post: 02-16-2009, 10:25 PM
  2. free 2d graphics engine for Dev C++?
    By two31d in forum C++ Programming
    Replies: 3
    Last Post: 11-29-2005, 06:48 AM
  3. Graphics library and header
    By Zagaberoo in forum C++ Programming
    Replies: 1
    Last Post: 03-28-2004, 06:43 PM
  4. Graphics library?
    By Paninaro in forum C Programming
    Replies: 6
    Last Post: 06-24-2002, 09:35 PM
  5. 2D Graphics In Game
    By drdroid33 in forum Game Programming
    Replies: 16
    Last Post: 02-23-2002, 10:01 PM

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