Merci beaucoup Eric !
Well I found a way to combine the GM and scripting (I read your
tutorial...)
Well, I think the GM is good enough for minor use / basic things...
and scripting stays the best way...
Greets,
Christian
Début du message réexpédié :
De : Eric Chatonet <[EMAIL PROTECTED]>
Date : 18 avril 2007 15:47:47 GMT+02:00
À : How to use Revolution <use-revolution@lists.runrev.com>
Objet : Rép : scaling and positioning proportionally an object at
the same time
Répondre à : How to use Revolution <use-revolution@lists.runrev.com>
Bonjour Christian,
Le 18 avr. 07 à 15:18, Christian Langers a écrit :
Hello,
I try since hours to do this :
I have an image (photo) on a stack which scales to the right and
down on resizing the stack (via Geometry Manager); I have a
graphic (rectangle) placed at a precise location on the image (the
user selects a portion of the image to hilite something on it);
Now I want that when the user resizes the window the graphic
scales and moves (up/down) proportionaly to the image , so that
the rectangle grows and shrinks with the image hiliting always the
same portion of the image (e.g. an eye of a face); I hope you
follow (it's difficult to explain this in English)...
I tried to use the GM in REv, but ...brrr... the graphic jumps
away from its original position when resizing...
So... please ! Heeeelp... This is getting me on my nerves ;-)
Thanks for any suggestions or solutions...
Christian
from Luxembourg
Actually don't trust the Geometry Manager and prefer to write your
own routines in a resizeStack handler ;-)
Here is, for instance, an excerpt from such a handler:
on resizeStack pNewW,pNewH,pOldW,pOldH -- note params passed by
Rev ;-)
global gPrefs
-----
if gPrefs["uAdds"] then ProportionalWResize the long name of img
"ToolbarShadow",pNewW,114
else ProportionalWResize the long name of img
"ToolbarShadow",pNewW,0
pass resizeStack
end resizeStack
And:
on ProportionalWResize pObj,pNewW,pDelta
local tRect
-----
put the rect of pObj into tRect
put pNewW - pDelta into item 3 of tRect
set the rect of pObj to tRect
end ProportionalWResize
Of course, the above example is simple and, sometimes, it might
appear more tricky...
But actually, Rev allows to script any complex resizing in any
case ;-)
Good luck!
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
http://www.sosmartsoftware.com/
[EMAIL PROTECTED]/
----------------------------------------------------------------
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution