home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2479 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: xs4all.nl!not-for-mail
  2. From: yrozijn@xs4all.nl (Yvon Rozijn)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Datatypes, datatypes, datatypes
  5. Date: 31 Jan 1996 18:47:50 GMT
  6. Organization: XS4ALL, networking for the masses
  7. Message-ID: <4eodgm$t73@news.xs4all.nl>
  8. References: <4ej7ma$2g6@hermes.cair.du.edu>
  9. NNTP-Posting-Host: ztm03-08.dial.xs4all.nl
  10. X-Newsreader: TIN [AMIGA 1.3 950726BETA PL0]
  11.  
  12. Edward Chadez (echadez@galileo.carl.org) wrote:
  13. : struct Screen *screen;  // points to an open screen
  14. : char *file_name;        // points to a string array with a valid filename
  15. :        obj = NewDTObject(file_name,
  16. :                          DTA_SourceType,    DTST_FILE,
  17. :                          DTA_GroupID,        GID_PICTURE,
  18. :                          PDTA_Remap,        TRUE,
  19. :                          PDTA_Screen,       screen,
  20. :                          OBP_Precision,     PRECISION_EXACT,
  21. :                          TAG_DONE);
  22. : I know that the object has been created, I can examine the BitMapHeader and
  23. : see that the depth = 4.  I convert the object to a bitmap via the call:
  24.  
  25. No you don't. You just ask for the bitmap pointer.
  26.  
  27. :             if (GetDTAttrs(obj,
  28. :                            PDTA_BitMap, &bmap,
  29. :                            TAG_DONE);
  30.  
  31. You have to do the actual remapping first:
  32.  
  33.          struct gpLayout gpl;
  34.          gpl.MethodID=DTM_PROCLAYOUT;
  35.          gpl.gpl_GInfo=NULL;
  36.          gpl.gpl_Initial=TRUE;
  37.          if(DoMethodA(obj,(Msg)&gpl))
  38.             ...
  39.  
  40. Yvon.
  41. -- 
  42.                  ___                                   _
  43.    Q          : |  #|           :  \|/  http://www. : [_]_
  44.  -<_>- Yvon   : | ==| yrozijn@  : >WWW< xs4all.nl/  : === ) Amiga
  45.   / \  Rozijn : `---' xs4all.nl :  /|\  ~yrozijn    :     O  4000
  46.