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