Article View: comp.windows.interviews
Article #384Re: floating Coord round-off
From: Donn Cave
Date: Tue, 08 Sep 1992 17:40
Date: Tue, 08 Sep 1992 17:40
38 lines
2402 bytes
2402 bytes
calder@NURB.JRC.FLINDERS.EDU.AU (Paul Calder) writes: |Donn Cave writes ... |>In 3.0.1, it sometimes seems that the actual size and position of |>elements on the screen is slightly more variable than one would expect, |>and I have been thinking that this is because of round-off errors between |>InterViews' floating point coordinate system, and X's integer screen |>coordinates. | This behaviour is an unavoidable consequence of round-off; to call it | an 'error' is a bit strong. Mark Linton's paper on device-independent | rendering addresses the issue in more detail. (The paper was | presented at XTech92 and is available from sgi.com as xconf92.ps.Z.) | You can avoid the 'undulation' on scrolling if you always scroll by | exact pixel-sized amounts. Thanks, but most of the problem is that the buttons look funny even when they're not scrolling. I didn't mean 'error' in a deprecatory way, it's simply a practical problem: if there are going to be narrow elements like the bevels in an outset frame, those elements need to have a uniform size or they will make for slightly distracting visual cues. To put it more personally, if I show my colleagues an application with a row of buttons, and one or two of the buttons seem oddly different because the 3-d decorations aren't uniform, they will laugh at me for using InterViews, and we can't have that. Someone helpfully sent a tip on Display::to_pixels() (albeit with disclaimer that he hadn't found it helpful), and I have been trying to think how to make, say, a subclass of Center or something that would force alignment to a non-fractional pixel coordinate, but I haven't gotten anywhere with it yet. I think I would have to overload draw()?, but I don't know how to find non-relative coordinates for a glyph. Donn Cave, University Computing Services, University of Washington donn@cac.washington.edu
Technical Details
Message-ID:
<1992Sep8.174046.12268@u.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!news.u.washington.edu!carson.u.washington.edu!donnReferences:
<9209060430.AA09946@nurb.jrc.flinders.edu.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!news.u.washington.edu!carson.u.washington.edu!donn From: donn@carson.u.washington.edu (Donn Cave) Newsgroups: comp.windows.interviews Subject: Re: floating Coord round-off Message-ID: <1992Sep8.174046.12268@u.washington.edu> Date: 8 Sep 92 17:40:46 GMT Article-I.D.: u.1992Sep8.174046.12268 References: <9209060430.AA09946@nurb.jrc.flinders.edu.au> Sender: news@u.washington.edu (USENET News System) Organization: University of Washington Lines: 38