Recent

Author Topic: I'm Confused over Screen/Monitor Resolution  (Read 931 times)

J-G

  • Hero Member
  • *****
  • Posts: 931
Re: I'm Confused over Screen/Monitor Resolution
« Reply #15 on: August 22, 2022, 03:30:31 pm »
[...]
You can, by and large, get the pixel count (X * Y) of the display panel. You can, by and large, get the monitor model name. I'd suggest that the best you can do is find a table which cross-references model name (subject to misspellings :-) with panel size, and /suggest/ this to the user... but ask for confirmation or override before relying on it for DPI.

It seems to me that Screen.Width and Screen.Height will provide the basic X,Y resolution and for accurate sizing of images you simply need the Monitor Pixel Size which should be available from the User Manual (not that any end user ever bothers to read such matter!) or marketing material.

The arithmetic to calculate the 'scale factor' is trivial.

This reminds me of my days in the drawing office where every drawing was anotated with details of the scale at which the images had been drawn but there was always a large [DO NOT SCALE] sign added :)
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

MarkMLl

  • Hero Member
  • *****
  • Posts: 5596
Re: I'm Confused over Screen/Monitor Resolution
« Reply #16 on: August 22, 2022, 03:31:00 pm »
Yes, which is another reason to start with the marketroid-significant X/Y pixels/mm parameters if possible.

In fact, I don't see any mention of a DPI value in that EDID data: possibly because it originated from monitors which would be less likely than TVs to assume a standardised aspect ratio.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

J-G

  • Hero Member
  • *****
  • Posts: 931
Re: I'm Confused over Screen/Monitor Resolution
« Reply #17 on: August 22, 2022, 03:35:52 pm »
And don't forget, that not all pixels are square...
That may - or may not - matter if the Pixel Pitch is the same V & H,   but I take your point.
FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

MarkMLl

  • Hero Member
  • *****
  • Posts: 5596
Re: I'm Confused over Screen/Monitor Resolution
« Reply #18 on: August 22, 2022, 03:38:29 pm »
It seems to me that Screen.Width and Screen.Height will provide the basic X,Y resolution and for accurate sizing of images you simply need the Monitor Pixel Size which should be available from the User Manual (not that any end user ever bothers to read such matter!) or marketing material.

I can't remember whether the values have to be got from the Screen or Monitor specification buried in the LCL's Application object: one of those is the current display while the other refers to the entire desktop (i.e. potentially multiple displays).

Quote
This reminds me of my days in the drawing office where every drawing was anotated with details of the scale at which the images had been drawn but there was always a large [DO NOT SCALE] sign added :)

Which is fine provided that the person interpreting the drawing understands the annotations, and the metadata that indicates that something is an annotation applying to the drawing rather than to the end product. I've got a little Chinese-made PSU on my desk where the manufacturer name silkscreened on the front is proudly announced to be PRODUCT SCHEMATIC.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

J-G

  • Hero Member
  • *****
  • Posts: 931
Re: I'm Confused over Screen/Monitor Resolution
« Reply #19 on: August 22, 2022, 04:17:10 pm »
[...]
I can't remember whether the values have to be got from the Screen or Monitor specification buried in the LCL's Application object: one of those is the current display while the other refers to the entire desktop (i.e. potentially multiple displays).
[...]
In a different project I did need to know the total space available and I had to look back at that project to remind me how I did it.

In fact Monitor & Screen (Height & Width) both return the same values. With multiple screens (which I have) you need to interogate Screen.DesktopWidth. With only two screens of course the DesktopHeight will be the same as Screen.Height, and how one would indicate a multi-row, multi-wide set I have no idea!


FPC 3.0.0 - Lazarus 1.6 &
FPC 3.2.2  - Lazarus 2.2.0 
Win 7 Ult 64

 

TinyPortal © 2005-2018