scaleFactor strangeness

hh hh at livecode.org
Thu Oct 15 10:45:20 EDT 2015


The scalefactor problem -- I reported this already months ago, in vain.

Currently LC uses the scalefactor as if the physical device has changed accordingly.
It scales(nearly) everything, and especially global coordinates.
That's why windows walk out to offscreen if you use a scalefactor > 1 and are still
staring at the same monitor.

Nothing bad about that, because

> "Use the scaleFactor property when developing to scale down stacks that 
> are larger than the available screen space."


What some of us wish is to use the scalefactor also for rendering (like PDF etc.).

For this a second kind of scalefactor is necessary. No way out of this.

** My proposal is to set a new property for all objects: the scalefactor **

The scalefactor of the stack remains the old one and may or may not used by its objects:
This scalefactor will be inherited (what obviously solves the group-problem).

The scalefactor of a button is then the product of the scalefactors of all the owners
along the owner path. That is, for example;

The scalefactor SF of a button in a (non-background-) group on a card is then

SF(stack) * SF(card) * SF(group) * SF(button).

Of course, the scalefactor of an object has the default value one.
The scalefactor of a stack is the only one that changes global coords. All others have
only impact on local coords.

For some few objects on a special stack I used this already by custom properties (that
is the math for all coords is to be computed, without difficulties, but its not native).

It's really simple, isn't it? And it works ...



More information about the use-livecode mailing list