Wayland surface units (Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces)

2013-05-22 Thread Pekka Paalanen
On Wed, 22 May 2013 10:12:00 +0200
Alexander Larsson  wrote:

> On tis, 2013-05-21 at 20:57 +0300, Pekka Paalanen wrote:
> 
> > We use the units of "pixels" in the surface coordinate system, even
> > if they do not correspond exactly to any "real" pixels like
> > elements in a buffer or on screen.
> 
> Actually this is sort of a problem. Maybe the docs would be clearer if
> we just used a different name for these? "points"?

That is a good idea, but choosing a name is hard. I think points will
get too easily confused with font sizes or the 1/72 inches unit and all
that mess.

Follow Android with "dp"?
http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

I'm not sure that is exactly the definition we want to use, with just
160 dpi changed to 96 dpi. I feel uneasy mentioning dpi at all. So
maybe not "dp", then.

We need a name for the surface length unit, since the surface local
coordinate system is such a central concept in Wayland.

I just can't seem to come up with anything serious.
- wayland units, wu
- wayland pixels, wp, wpx
- surface units, su
- surface unit pixels, sux
- surface pixels, sp, spx
- wayland surface units, wsu
- wayland atomic units, wau
- pips, pip
ehhh...


Cheers,
pq
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: Wayland surface units (Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces)

2013-05-22 Thread Alexander Larsson
On ons, 2013-05-22 at 12:11 +0300, Pekka Paalanen wrote:
> On Wed, 22 May 2013 10:12:00 +0200
> Alexander Larsson  wrote:
> 
> > On tis, 2013-05-21 at 20:57 +0300, Pekka Paalanen wrote:
> > 
> > > We use the units of "pixels" in the surface coordinate system, even
> > > if they do not correspond exactly to any "real" pixels like
> > > elements in a buffer or on screen.
> > 
> > Actually this is sort of a problem. Maybe the docs would be clearer if
> > we just used a different name for these? "points"?
> 
> That is a good idea, but choosing a name is hard. I think points will
> get too easily confused with font sizes or the 1/72 inches unit and all
> that mess.
> 
> Follow Android with "dp"?
> http://developer.android.com/guide/topics/resources/more-resources.html#Dimension
> 
> I'm not sure that is exactly the definition we want to use, with just
> 160 dpi changed to 96 dpi. I feel uneasy mentioning dpi at all. So
> maybe not "dp", then.

Yeah, i'd rather have it disconnected from some physical notion of size.

> We need a name for the surface length unit, since the surface local
> coordinate system is such a central concept in Wayland.
> 
> I just can't seem to come up with anything serious.
> - wayland units, wu
> - wayland pixels, wp, wpx
> - surface units, su
> - surface unit pixels, sux
> - surface pixels, sp, spx
> - wayland surface units, wsu
> - wayland atomic units, wau
> - pips, pip
> ehhh...

Yeah, names are hard. But "sux" is awesome!

Other alternatives:
- compositor units, cu
- pels, pel
- dots, dot
- surface element, surfel, sel

none of these are great either...







___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: Wayland surface units (Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces)

2013-05-22 Thread Alexander Larsson
On ons, 2013-05-22 at 11:42 +0200, Alexander Larsson wrote:
> On ons, 2013-05-22 at 12:11 +0300, Pekka Paalanen wrote:

> > - wayland units, wu
> > - wayland pixels, wp, wpx
> > - surface units, su
> > - surface unit pixels, sux
> > - surface pixels, sp, spx
> > - wayland surface units, wsu
> > - wayland atomic units, wau
> > - pips, pip
> > ehhh...
> 
> Yeah, names are hard. But "sux" is awesome!
> 
> Other alternatives:
> - compositor units, cu
> - pels, pel
> - dots, dot
> - surface element, surfel, sel
> 
> none of these are great either...

For the record, Microsoft uses "DIP", for Device-independent-pixels, and
Apple uses "Points" for the non-hardware coordinates (in the app level
APIs).



___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: Wayland surface units (Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces)

2013-05-22 Thread Pekka Paalanen
On Wed, 22 May 2013 11:50:31 +0200
Alexander Larsson  wrote:

> On ons, 2013-05-22 at 11:42 +0200, Alexander Larsson wrote:
> > On ons, 2013-05-22 at 12:11 +0300, Pekka Paalanen wrote:
> 
> > > - wayland units, wu
> > > - wayland pixels, wp, wpx
> > > - surface units, su
> > > - surface unit pixels, sux
> > > - surface pixels, sp, spx
> > > - wayland surface units, wsu
> > > - wayland atomic units, wau
> > > - pips, pip
> > > ehhh...
> > 
> > Yeah, names are hard. But "sux" is awesome!
> > 
> > Other alternatives:
> > - compositor units, cu
> > - pels, pel
> > - dots, dot
> > - surface element, surfel, sel
> > 
> > none of these are great either...
> 
> For the record, Microsoft uses "DIP", for Device-independent-pixels, and
> Apple uses "Points" for the non-hardware coordinates (in the app level
> APIs).

And we have no well-known equivalent in the FOSS or Linux world?

DIP would sound fine otherwise, except Microsoft seems to tie it to the
physical units via dpi again. Meh.

"pel" sounds nice...


- pq
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: Wayland surface units (Re: [PATCH 2/2] protocol: Support scaled outputs and surfaces)

2013-05-22 Thread Alexander Larsson
On ons, 2013-05-22 at 13:01 +0300, Pekka Paalanen wrote:

> > For the record, Microsoft uses "DIP", for Device-independent-pixels, and
> > Apple uses "Points" for the non-hardware coordinates (in the app level
> > APIs).
> 
> And we have no well-known equivalent in the FOSS or Linux world?

Not that I know of.

> DIP would sound fine otherwise, except Microsoft seems to tie it to the
> physical units via dpi again. Meh.
> 
> "pel" sounds nice...

pel is from "Picture ELement", and was historically used equivalently to
"pixel". But "pixel" won that fight and nobody remembers "pel". So, by
now we can probably use them as two not-quite-equivalent units without
risking confusion.



___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel