scaleFactor strangeness

Richard Gaskin ambassador at fourthworld.com
Thu Oct 15 03:18:05 EDT 2015


Dr. Hawkins wrote:
 > As far as retrofitting to the older language, as someone (Richard?)
 > mentioned, it could be done by
 >
 >   set the groupTop of field myField to 100
 >
 > and so forth.

I don't think that one's mine, but similar ideas have been floating 
around for a while for making positioning within groups simpler.

I like the xOrigin and yOrigin in HTML's Canvas, and maybe something 
even simpler for LC groups might be a local property in the script along 
the lines of "the useGroupCoordinates" (maybe abbreviated 
"useGrpCoords"), e.g."

   set the useGrpCoords to the long id of grp "SomeParentGroup"
   set the rect of btn "ChildBtn" to 10,10,110,30

The result there would set the rect of the button "ChildBtn" relative to 
both the rect and scroll of the specified group.

Not married to the suggested token, but something like it might be a 
useful way of simplifying positioning within groups.

If scaling within groups were available, all scaling would be 
independent of our scripting.  That is, the script above would render 
appropriately whether the scale is 1, 0.5, or 2, so scripting works in 
factor 1 sizes while rendering accounts for the scale.

If we need to know the actual rects of objects within scaled groups, 
"the effective rect" would give us that info.

Scripts stay simple to write, coordinates obtainable either translated 
for scale or not with minimal effort.

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com





More information about the use-livecode mailing list