Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-10-04 10:02:01


Stefan Seefeld wrote:

>> Can you elaborate on this? For explicit 2D graphics "pixel" is already
>> just a convention, since you can scale that as you like. And for window
>> layout, well, you should not do manual window layout at all. GUI library
>> should select font size and other things, and everything will be laid
>> out. What problems do you have in mind?
>
> Sizes are usually given in resolution-dependent coordinates (i.e. pixels).
> If you change resolution, you typically don't do that to expose more
> detail, but to make your desktop 'bigger' (by making text, widgets, etc.
> smaller).
>
> If 'pixel' is only a convention that isn't related to device coordinates,
> great. Still, 'pixels' have a physical size of their own that varies
> between devices. I think it would be best to remove this degree of
> freedom, or at least, be explicit about when the user (GUI developer) is
> operating in device coordinates and when he is not.

Let me try from a different angle. There's some settings made by user, like
font size, or toolbar icon size. The unit does not matter there.

I believe that in a good GUI library, you should not ever need to use any
dimensions for windows dimensions, but just allow the layout code in the
library to take care of this. And since you don't have to specify
dimensions, it does not matter if they are in pixels or not.

So, it looks like the only place where coordinate unit choice makes a
difference makes difference is explicit 2D graphics (drawing lines, circles
and the like).

Do we agree so far? I'm just trying to narrow down the scope of discussion.
It just don't not make sense, IMO, to have a choice of coordinate unit for
mouse press event.

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk