• 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MobileSheets and MobileSheetsPro v3.0.0 Released
(01-16-2021, 04:31 AM)Zubersoft Wrote: So I decided that the right approach would be to ensure that, if the user has selected size 15, that I figure out what raw size is required in the PDF page to result in 15 pixels on the screen. So if the file is scaled up by 300%, I use a size 5 in terms of the raw PDF page, which then appears to be 15 pixels on the screen. If you rotate between portrait and landscape, you are changing the amount the page is scaled up to fit the screen, so the size will be saved as a different value in terms of the raw PDF page, but it should appear to be 15 pixels on the screen. This does mean that annotations created in different orientations with the same settings will appear to be different sizes though, when viewed side-by-side.

Thanks Mike for the detailed explanation.  The way I see it text and stamps should behave similar to any word processor. Size 15  is always the same across documents and regardless of zoom level. So I agree with the quoted approach. I don't care what translation of pixels the code does behind the scenes.

I may be wrong but here is what the term 'point'  vs 'pixel' comes into play.
Look at points as a unit of length and it's not dependent on zoom level so an annotation on a printed page it will zoom always along with the rest of the page.
When you type something in Word with a 15pt font, it doesn't matter if you do it in portrait, landscape, or zoomed in, it will always be correct and the same across documents.
How to translate this concept to code is the key.  I'm not sure if I'm comparing apples with apples since MSP deals mostly with scanned images and word processors probably work differently.

Here is an extract from a typography post:

'A pixel is a single square 'picture element' (hence pix-el), i.e. a single dot in your image. A 10x10 image is made up of a set of pixels in a grid 10 wide by 10 high, totaling 100 pixels.
The 'point' (pt) on the other hand is a unit of length, commonly used to measure the height of a font, but technically capable of measuring any length. In applications, 1pt is equal to exactly 1/72th of an inch; in traditional print technically 72pt is 0.996264 inches, although I think you'll be forgiven for rounding it up!

How many pixels = 1pt depends on the resolution of your image. If your image is 72ppi (pixels per inch), then one point will equal exactly one pixel.'
Onyx Boox Max Lumi 13.3 -Android 10
Donner BT pedal
_________________
www.juandemarias.com
Victoria, BC, Canada - PST (UTC-8)
Reply


Messages In This Thread
RE: MobileSheets and MobileSheetsPro v3.0.0 Released - by palosanto - 01-16-2021, 04:52 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2022 MyBB Group.