home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / amiga / programm / 16037 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.7 KB

  1. Path: sparky!uunet!cbmvax!peter
  2. From: peter@cbmvax.commodore.com (Peter Cherna)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Aspect ratio from display database -- How?
  5. Message-ID: <37134@cbmvax.commodore.com>
  6. Date: 18 Nov 92 17:04:51 GMT
  7. References: <shf.721983639@well.sf.ca.us>
  8. Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
  9. Organization: Commodore-Amiga, Inc.  West Chester, PA.
  10. Lines: 26
  11.  
  12. In article <shf.721983639@well.sf.ca.us> shf@well.sf.ca.us (Stuart H. Ferguson) writes:
  13. >I want to open a screen that mimics the Workbench so my program will run
  14. >under the user's prefered display configuration.  I think I understand
  15. >about public screen and mode-id's and the display database.
  16.  
  17. For a given mode ID, you can find much of what you need in the DisplayInfo
  18. structure.  You can use GetDisplayInfoData() with the DTAG_DISP option
  19. to get this structure.  The DisplayInfo.Resolution field gives you the
  20. "ticks" per pixel of a given mode.  Ticks are an arbitrary unit, but
  21. the number of ticks on a display is a crude constant.  That is to say,
  22. it's typically of the same order, regardless of monitor type.  The
  23. ratio of Resolution.X to Resolution.Y is the aspect ratio.
  24.  
  25. How ticks per pixel converts to pixels per inch is not defined, but
  26. there might be a way in the future for the user to effectively measure
  27. pixels per inch on his particular screen, and inform the system.
  28.  
  29. >        Stuart Ferguson        (shf@well.sf.ca.us)
  30.  
  31.      Peter
  32. --
  33. Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
  34. {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
  35. My opinions do not necessarily represent the opinions of my employer.
  36. "I believe it's bad luck to be superstitious."
  37.  
  38.