delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/26/07:19:27

From: "Sly" <sly AT aussie DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro bitmaps
Date: 26 Mar 1997 06:12:10 GMT
Organization: Sly
Lines: 21
Message-ID: <01bc39ad$32477300$90081ecb@sly>
References: <01bc36a8$c77e9aa0$522549c2 AT default>
NNTP-Posting-Host: max0ppp14.bne.aussie.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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;

-- 
TTFN
Sly (Steve)
sly AT aussie DOT net

- Raw text -


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