delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/01/10:48:38

From: triquet AT fil DOT univ-lille1 DOT fr (triquet frederic)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro bitmaps
Date: 1 Apr 1997 13:36:57 GMT
Organization: Formations Informatiques Lille - F.I.L. - Bāt. M5
Lines: 32
Message-ID: <5hr31p$ai3@netserver.univ-lille1.fr>
References: <01bc39ad$32477300$90081ecb AT sly>
Reply-To: triquet AT fil DOT univ-lille1 DOT fr
NNTP-Posting-Host: stu7.fil.univ-lille1.fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <01bc39ad$32477300$90081ecb AT sly>, "Sly" <sly AT aussie DOT net> writes:
+->Thomas Harte <T DOT Harte AT btinternet DOT com> wrote in article
+-><01bc36a8$c77e9aa0$522549c2 AT default>...
+->> 	How do you find out the size of an Allegro bitmap?
+->> I read the Allegro.txt, and it told me about the bitmap struct, but
+->> <bitmap>.h & <bitmap>.w don't work. What is the correct way to read the
+->> dimensions of an Allegro bitmap?
+->
+->A bitmap is declared by the following line:
+->
+->BITMAP *bitmap;
+->
+->This is a pointer to the bitmap.  To get access to the members of this
+->structure, use the -> operator, as such...
+->
+->size = bitmap->w * bitmap->h;
+->

Yes, you can also do it this way:

size = (*bitmap).w * (*bitmap).h;

I prefer using the one with " -> "  but you can find the other too.


-- 
				Fred.
Frederic Triquet
E-Mail: triquet AT fil DOT univ-lille1 DOT fr
Or: rodger DOT adrenaline AT writeme DOT com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019