Drawing and images in C

  • Follow


I'm making a program in C, in which I would like to be able to show 
images and to draw on the screen. How can I do that?

Michael K. P.
0
Reply m_kragh_pedersen (11) 2/19/2005 10:37:03 AM

Michael Kragh Pedersen wrote:
> 
> I'm making a program in C, in which I would like to be able to show
> images and to draw on the screen. How can I do that?

This depends to a large extent on which platform(s) you wish to target.
Basically, you need to find a graphics library that is supported on
(or at least available for!) your platform, and use its routines to do
graphical things you want to do. The following list is most definitely
non-exhaustive.

MS-DOS: (Borland) BGI, various Microsoft C extensions, Allegro.

Win32: Win32 API, GTK+, SDL, Allegro.

Linux: (at least) XLib, GTK+, SDL, Allegro(?).

Atari: last I checked, Atari machines had a graphics library in
ROM, called VDI.

Mac etc: no idea, sorry.

Discussion of how to use these libraries is beyond the scope generally
accepted as topical by comp.lang.c regular contributors, so you will
need to find a newsgroup that deals with the platform you are targeting
if you want further help.
0
Reply infobahn (503) 2/19/2005 11:16:29 AM


Michael Kragh Pedersen <m_kragh_pedersen@hotmail.com> wrote:
> I'm making a program in C, in which I would like to be able to show 
> images and to draw on the screen. How can I do that?

That question is off-topic for this group:  the group is dedicated 
to discussing standard c, which tends to be a rather narrow subject.  
The c language has no way of showing an image or drawing on the 
screen, that capability tends to be platform dependent and is provided
by non-standard c libraries.

comp.os.ms-windows.programmer.win32 is probably the group you are 
looking for (you didn't specify an OS, I'm assuming windows).  But 
don't post:  Go to groups.google.com or groups.google.ca and 
search the archives for your question.  You don't want to ask 
the same question that was answered last week!

However, your question is poorly worded, I suggest reading this 
first:

	http://www.catb.org/~esr/faqs/smart-questions.html

Google's web search is also an alternative, and is probably worth
checking first, try searching for "<platform> programming tutorial".
When I tried searching for "windows programming tutorial" I found many
links.

-- 
  With sufficient thrust, pigs fly just fine. However, this is
  not necessarily a good idea. It is hard to be sure where they
  are going to land, and it could be dangerous sitting under them
  as they fly overhead.                              -- RFC 1925
0
Reply meyer_spammenot_ (17) 2/19/2005 11:59:27 AM

infobahn wrote:
> Michael Kragh Pedersen wrote:
> 
>>I'm making a program in C, in which I would like to be able to show
>>images and to draw on the screen. How can I do that?
> 
> 
> This depends to a large extent on which platform(s) you wish to target.
> Basically, you need to find a graphics library that is supported on
> (or at least available for!) your platform, and use its routines to do
> graphical things you want to do. The following list is most definitely
> non-exhaustive.
> 
> MS-DOS: (Borland) BGI, various Microsoft C extensions, Allegro.
> 
> Win32: Win32 API, GTK+, SDL, Allegro.
> 
> Linux: (at least) XLib, GTK+, SDL, Allegro(?).
> 
> Atari: last I checked, Atari machines had a graphics library in
> ROM, called VDI.
> 
> Mac etc: no idea, sorry.
> 
> Discussion of how to use these libraries is beyond the scope generally
> accepted as topical by comp.lang.c regular contributors, so you will
> need to find a newsgroup that deals with the platform you are targeting
> if you want further help.
Well, since it's only something, I'm making for my own computer, I can 
settle with Win32 :)

But I will do that, although for me, the scope of this newsgroup is 
logically everything, that has to do with the C language...you can't 
really expect ppl to read from the name, that it's only for standard C, 
I think :)

Michael K. P.
0
Reply m_kragh_pedersen (11) 2/20/2005 2:50:21 PM

Michael Kragh Pedersen <m_kragh_pedersen@hotmail.com> wrote:
> But I will do that, although for me, the scope of this newsgroup is 
> logically everything, that has to do with the C language...you can't 
> really expect ppl to read from the name, that it's only for standard C, 
> I think :)

That's why its considered polite to hunt down any FAQs the newsgroup
has, as well as to search the group's archives to see if the question 
has been asked before.

-- 
  With sufficient thrust, pigs fly just fine. However, this is
  not necessarily a good idea. It is hard to be sure where they
  are going to land, and it could be dangerous sitting under them
  as they fly overhead.                              -- RFC 1925
0
Reply meyer_spammenot_ (17) 2/20/2005 4:11:40 PM

Jesse Meyer wrote:
> Michael Kragh Pedersen <m_kragh_pedersen@hotmail.com> wrote:
> 
>>But I will do that, although for me, the scope of this newsgroup is 
>>logically everything, that has to do with the C language...you can't 
>>really expect ppl to read from the name, that it's only for standard C, 
>>I think :)
> 
> 
> That's why its considered polite to hunt down any FAQs the newsgroup
> has, as well as to search the group's archives to see if the question 
> has been asked before.
> 
The last is true, and I usually do that every time, but I hardly ever 
find the answers, I need :)

Michael K. P.
0
Reply m_kragh_pedersen (11) 2/20/2005 5:06:43 PM

5 Replies
40 Views

(page loaded in 0.077 seconds)

Similiar Articles:













7/27/2012 8:02:38 AM


Reply: