Re: Confusion about screen resolution

2020-02-22 Thread Richard Charles via Cocoa-dev

> On Feb 22, 2020, at 7:34 PM, Quincey Morris via Cocoa-dev 
>  wrote:
> 
> The way things are now, starting from the selected Displays pane point size, 
> whatever that happens to be, the backing store is 2x or 3x — an integral 
> scale *up* — and the result is scaled — typically *down* by a non-integral 
> amount — to the hardware physical pixel dimensions of the screen.


Thank you Quincey for the excellent summary.

NSWindow documentation for the backingScaleFactor indicates "The value of this 
property is 2.0 for high-resolution scaled display modes, and 1.0 for all other 
cases."

I am just curious, have you actually seen a 3X backing store or is this just a 
surmise?

--Richard Charles

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Quincey Morris via Cocoa-dev
On Feb 22, 2020, at 15:31 , Gabriel Zachmann via Cocoa-dev 
 wrote:
> 
> I was always under the impression that the backing store is 2x the size of 
> the display.
> That should be then 2x( 2880 x 1800 ), i.e., 5760 x 3600 , shouldn't it?
> 
> So, either the frameRect should be 2880x1800  or 5760 x 3600 , both would 
> make sense to me.

As multiple people have said, this isn’t true any more.

If you go to the Displays pane of System Preferences, and choose the Scaled 
option, you will see (at least, I see on a 27” iMac) 5 different size settings. 
Each one of the represents a different screen size *in points*. The smaller the 
dimensions in points, the larger a point is, since the point size is 
“stretched” to fit the physical display.

The way things are now, starting from the selected Displays pane point size, 
whatever that happens to be, the backing store is 2x or 3x — an integral scale 
*up* — and the result is scaled — typically *down* by a non-integral amount — 
to the hardware physical pixel dimensions of the screen.

None of this should matter to your code.

> I am just curious, how do they do that given the fact that they first render 
> it into a backing store and then scale it down by some very odd factor, which 
> is definitely not 2 or 1 or some other similar "easy" case. How is that I am 
> not seeing any resampling artefacts.

It works because of the implicit scaling up to an abnormally high resolution in 
the backing store. The introduces enough detail so that the fractional 
scale-down factor looks great in most cases. (However, if you try some of the 
extreme scaled Display resolutions, you’ll probably think they look a bit soft 
or fuzzy.)

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Gabriel Zachmann via Cocoa-dev


> For Retina displays, the backing store's size is always 2x the size in points 
> that Cocoa reports.  The backing store is then scaled to the display's 
> physical resolution.
> 
> Also, even if though the default point-size-to-display-physical-pixels used 
> to be 2x, remember that other scaling was always supported.  The fact that 
> the default has changed doesn't introduce a *new* problem.  Apple always had 
> to have a solution for this.

Sure, I am not saying it's new, nor am I saying it's a problem.

Obviously, the text rendering (without zooming in), is very crisp on my retina 
display
(MacbookPro 15'' 2019, Touch Bar). I am looking at it with a magnifying glass.

I am just curious, how do they do that given the fact that they first render it 
into a backing store and then scale it down by some very odd factor, which is 
definitely not 2 or 1 or some other similar "easy" case. How is that I am not 
seeing any resampling artefacts.
Bear in mind that text rendering is a pretty tricky business with all those 
hinting, and kernings, and serifs, and what not.


Best regards, Gabriel



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Gabriel Zachmann via Cocoa-dev
> 
> Does it make sense that starting at 1.7 gives you a 0.3 headroom for ‘zoom’ 
> without having to upsample?

You mean the accessibility zoom?
No, it does not make sense to me.
First of all, I can zoom in much more, so why waste 0.3 headroom although most 
people don't even know about it?
Second, when you zoom in, you can clearly see anti-aliasing artefacts. 

I don't know when this started, I have not checked before Catalina.

I was always under the impression that the backing store is 2x the size of the 
display.
That should be then 2x( 2880 x 1800 ), i.e., 5760 x 3600 , shouldn't it?

So, either the frameRect should be 2880x1800  or 5760 x 3600 , both would make 
sense to me.


Best regards, Gabriel

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Ken Thomases via Cocoa-dev
On Feb 22, 2020, at 2:48 PM, Rick Aurbach via Cocoa-dev 
 wrote:
> 
> I think you are confusing pixels and points.
> 
> A pixel is an addressable light-emitting area on the screen. Your screen 
> contains 2880 X 1800 pixels.
> 
> But a typographical  point is a unit of distance. There are [72] points per 
> inch. (I.e., a typographical point is 0.0139 inches or 0.353 mm).

You are correct to emphasize the difference between points and pixels.  
However, points (as used by Apple) are *not* typographical points.  They are 
arbitrary.

>From 
>:

"When used in reference to high resolution in OS X, points in user space do not 
have any relation to measurements in the physical world."


In particular, you can set macOS to scale the display to other point sizes.  A 
point can't equal 1/72" in all of them.  And, of course, many monitors were ~96 
DPI for a long time back when pixels and points were equivalent.

-Ken

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Rick Aurbach via Cocoa-dev
Transposition type indeed! Thanks for catching it. (If you check my 
calculations, I was clearly using 72 pt/in)

Cheers,

Rick Aurbach
8233 Tulane Avenue
St. Louis, MO 63132

eMail: rla...@icloud.com
Phone:   314/721-7987

“The single biggest problem in communication is the illusion that it has taken 
place.”
– George Bernard Shaw (1856–1950)


> On Feb 22, 2020, at 3:36 PM, Marco S Hyman  wrote:
> 
>> 
>> But a typographical  point is a unit of distance. There are 27 points per 
>> inch. (I.e., a typographical point is 0.0139 inches or 0.353 mm).
> 
> Transposition typo? There are 72 points/inch.  The given inch and mm values 
> are correct if rounded to 3 digits.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Marco S Hyman via Cocoa-dev
> 
> But a typographical  point is a unit of distance. There are 27 points per 
> inch. (I.e., a typographical point is 0.0139 inches or 0.353 mm).

Transposition typo? There are 72 points/inch.  The given inch and mm values are 
correct if rounded to 3 digits.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Rick Aurbach via Cocoa-dev
> Message: 1
> Date: Sat, 22 Feb 2020 14:24:40 +0100
> From: Gabriel Zachmann mailto:z...@cs.uni-bremen.de>>
> To: "cocoa-dev@lists.apple.com " 
> mailto:cocoa-dev@lists.apple.com>>
> Subject: Confusion about screen resolution
> Message-ID:  >
> Content-Type: text/plain; charset=us-ascii
> 
> When my screensaver gets invoked by the screensaver engine, it calls 
> - (id) initWithFrame: (NSRect) frameRect isPreview: (BOOL) preview
> 
> Funny thing is, when I print the frameRect to the log, I get  1680 x 1050.
> But my laptop screen really has 2880 x 1800!  (That's what I get from "About 
> this Mac")
> 
> I am running under Catalina 10.15.3.
> 
> 
> Can any one please shed some light on this?
> 
> Thanks a lot in advance.
> Gab.
> 

Gab,

I think you are confusing pixels and points.

A pixel is an addressable light-emitting area on the screen. Your screen 
contains 2880 X 1800 pixels.

But a typographical  point is a unit of distance. There are 27 points per inch. 
(I.e., a typographical point is 0.0139 inches or 0.353 mm).

Recalling that screen sizes are measured diagonally, the diagonal of a 1680pt  
X 1050pt rectangle is 1981pt (or 27 inches). I conclude that your Mac has a 
27-inch screen at a resolution of 123 X 123 px/in.

Cheers,

Rick Aurbach
8233 Tulane Avenue
St. Louis, MO 63132

eMail: rla...@icloud.com
Phone:   314/721-7987

H-A-R-D-W-A-R-E
(noun)

“The part of a computer you can kick."
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Saagar Jha via Cocoa-dev
I believe this became the default with the new MacBook Pros that came out in 
2016.

Saagar Jha

> On Feb 22, 2020, at 09:13, Steve Mills via Cocoa-dev 
>  wrote:
> 
>> On Feb 22, 2020, at 10:04, Richard Charles via Cocoa-dev 
>>  wrote:
>> 
>> This is bizarre. When did this start, Catalina? It has been my experience 
>> that the default scale factor is 1.0 for normal displays and 2.0 for Retina 
>> displays.
> 
> It’s been that way for quite a while. 10.12 or 10.13 maybe? I can’t remember 
> for sure. They all blur together. It makes sense to default to a size that’s 
> usable for most users, And if high res screens still look great at <2x, then 
> there’s no reason why fractional resolutions shouldn’t be used.
> 
> Steve via iPad
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/saagar%40saagarjha.com
> 
> This email sent to saa...@saagarjha.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Sandor Szatmari via Cocoa-dev

> On Feb 22, 2020, at 12:30, Ken Thomases via Cocoa-dev 
>  wrote:
> 
> On Feb 22, 2020, at 9:02 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
>> 
>>> 
>>> No, the default on recent Macs is scaled to slightly under 2x.
>>> 
>> 
>> It is about ~ 1.7 .
>> 
>> this means that every view has to be scaled by this odd factor, before 
>> writing its contents into the frame buffer.
>> I am curious as to why that doesn't cause any aliasing artefacts, or 
>> anti-aliasing artefacts ...
> 
> For Retina displays, the backing store's size is always 2x the size in points 
> that Cocoa reports.  The backing store is then scaled to the display's 
> physical resolution.
> 
> Also, even if though the default point-size-to-display-physical-pixels used 
> to be 2x, remember that other scaling was always supported.  The fact that 
> the default has changed doesn't introduce a *new* problem.  Apple always had 
> to have a solution for this.

Does it make sense that starting at 1.7 gives you a 0.3 headroom for ‘zoom’ 
without having to upsample?

Sandor
> 
> Regards,
> Ken
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/admin.szatmari.net%40gmail.com
> 
> This email sent to admin.szatmari@gmail.com
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Ken Thomases via Cocoa-dev
On Feb 22, 2020, at 9:02 AM, Gabriel Zachmann via Cocoa-dev 
 wrote:
> 
>> 
>> No, the default on recent Macs is scaled to slightly under 2x.
>> 
> 
> It is about ~ 1.7 .
> 
> this means that every view has to be scaled by this odd factor, before 
> writing its contents into the frame buffer.
> I am curious as to why that doesn't cause any aliasing artefacts, or 
> anti-aliasing artefacts ...

For Retina displays, the backing store's size is always 2x the size in points 
that Cocoa reports.  The backing store is then scaled to the display's physical 
resolution.

Also, even if though the default point-size-to-display-physical-pixels used to 
be 2x, remember that other scaling was always supported.  The fact that the 
default has changed doesn't introduce a *new* problem.  Apple always had to 
have a solution for this.

Regards,
Ken

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Steve Mills via Cocoa-dev
> On Feb 22, 2020, at 10:04, Richard Charles via Cocoa-dev 
>  wrote:
> 
> This is bizarre. When did this start, Catalina? It has been my experience 
> that the default scale factor is 1.0 for normal displays and 2.0 for Retina 
> displays.

It’s been that way for quite a while. 10.12 or 10.13 maybe? I can’t remember 
for sure. They all blur together. It makes sense to default to a size that’s 
usable for most users, And if high res screens still look great at <2x, then 
there’s no reason why fractional resolutions shouldn’t be used.

Steve via iPad

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Richard Charles via Cocoa-dev


> On Feb 22, 2020, at 8:02 AM, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
>> 
>> No, the default on recent Macs is scaled to slightly under 2x.
>> 
> 
> It is about ~ 1.7 .
> 
> this means that every view has to be scaled by this odd factor, before 
> writing its contents into the frame buffer.
> I am curious as to why that doesn't cause any aliasing artefacts, or 
> anti-aliasing artefacts ...
> 
> Best, G.
> 

This is bizarre. When did this start, Catalina? It has been my experience that 
the default scale factor is 1.0 for normal displays and 2.0 for Retina displays.

--Richard Charles

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Gabriel Zachmann via Cocoa-dev
> 
> No, the default on recent Macs is scaled to slightly under 2x.
> 

It is about ~ 1.7 .

this means that every view has to be scaled by this odd factor, before writing 
its contents into the frame buffer.
I am curious as to why that doesn't cause any aliasing artefacts, or 
anti-aliasing artefacts ...

Best, G.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Saagar Jha via Cocoa-dev
No, the default on recent Macs is scaled to slightly under 2x.

Saagar Jha

> On Feb 22, 2020, at 05:55, Gabriel Zachmann via Cocoa-dev 
>  wrote:
> 
>> 
>> What have you set in System Preferences > Displays > Resolution. On a Retina 
>> MacBook most 
> 
> I have set it to "Default for display" - shouldn't that set the resolution to 
> the native one?
> 
> Best regards, Gabriel
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/saagar%40saagarjha.com
> 
> This email sent to saa...@saagarjha.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Confusion about screen resolution

2020-02-22 Thread Gabriel Zachmann via Cocoa-dev
> 
> What have you set in System Preferences > Displays > Resolution. On a Retina 
> MacBook most 

I have set it to "Default for display" - shouldn't that set the resolution to 
the native one?

Best regards, Gabriel


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Confusion about screen resolution

2020-02-22 Thread Gabriel Zachmann via Cocoa-dev
When my screensaver gets invoked by the screensaver engine, it calls 
- (id) initWithFrame: (NSRect) frameRect isPreview: (BOOL) preview

Funny thing is, when I print the frameRect to the log, I get  1680 x 1050.
But my laptop screen really has 2880 x 1800!  (That's what I get from "About 
this Mac")

I am running under Catalina 10.15.3.


Can any one please shed some light on this?

Thanks a lot in advance.
Gab.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com