Peter,
(you might find this a really unhelpful reply, but I hope not).
I think you're looking at this backwards. As a user of a WP app, I don't
know, think or care about pixels. What I am doing is preparing a piece
of paper - whether it's A4 or letter-size or whatever - I am working
towards making a "page" on a piece of paper.
So (if you are working in WYSIWYG mode - as most modern WPs do most of
the time) the view on the screen is simply a representation of that
piece of paper (or perhaps of the printed (i.e. within the margins)
subset of it).
As a user, I want to say (or be defaulted to ...) something like
letter size (i.e. 8-1/2" x 11")
margins of 1"
tab stops at 1.2" intervals
etc.
So, you can (easily???) translate that because
the current viewport is 900 pixels wide
user is viewing at nominal 100%
(i.e. the whole sheet fits within the viewport width, NOT that
lettters will be the same size on-screen as when printed)
therefore 6-1/2 inches on-page is equivalent to 900 pixels
--> 138.5 pixels per inch (900 / 6.5)
--> set tab stops to multiples of 166.
(and of course similar translation is needed for point sizes, etc.)
-- Alex.
P.S. if this turns into a library, or set of behaviours, or group with
associated content field + ruler group + button bar + behaviours and
handlers - then I'm first in line to purchase a copy :-)
On 11/08/2014 22:13, Peter Haworth wrote:
I've put together a mini word processing stack within an LC app. All is
working fine except that the ruler I display at the top of the input field
to show margins, indents and tabs is currently laid out in pixels since
most of the field and paragraph settings work in pixels.
All the WP applications I've looked at have their ruler in inches (or
centimetres) but I can't figure out a way to handle that. If the input
field is 500 pixels wide, how many inches is that in a print layout? And
if I have a tab stop at pixel 40, how can I figure out where to show that
on the ruler in inches? Is it even possible to do that in LC?
Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode