Can one manually resize an object proportionately?

2005-04-10 Thread Alejandro Tejada
on Sun, 10 Apr 2005 
Steve Goldberg wrote:

> there needs to be some way to do
> this manually, such as holding down 
> the Shift key while doing the resizing (like in
> Photoshop), which I don't see 
> is a feature of Revolution.   In that way, one can
> do the resizing on the fly, 
> eyeballing whether or not the object is the right
> size for the card, rather 
> than having to experiment with different numbers
> until the size seems right. So 
> if anyone has way of doing this, I'd certainly like
> to hear about it. Thanks.

Howard Bornstein answer:

> Here's a quick and dirty way to do what you want. 
> I'm sure someone can come up with a more 
> elegant method.

> In your stack script put this handler
[snip]

Hi Steve and Howard,

I added a mouseup and mousedoubleup
handler to the stack script provided
by Howard, to choose the pointer tool
(pressing controlkey and mouseup over
the target object) and choose the
browse tool again to resume normal
operation (by doubleclicking over the
background).

I uploaded an stack that works if
you open it by double clicking, but does not
work if you open in the development environment,
unless you "suspend Revolution".

Use the keys combination provided by Howard
after you have the pointer tool, to resize
proportionally. I notice that it resizes from
center, not from a corner.

Download it from:



al

Visit my site:
http://www.geocities.com/capellan2000/



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can one manually resize an object proportionately?

2005-04-10 Thread Stgoldberg
I have a very crude way of addressing the problem of trying to reduce an 
object manually proportionately.   One takes the vector line tool and draws a 
line 
starting just inside the upper left hand border of the image and dragging it 
to just inside the lower right border of the image.   Then you select the 
image and drag it along the line, thereby keeping the proportions.   After the 
image is the right size, one can erase the line. However, it does seem it would 
be much better if Revolution changed the scripting so that one can 
proportionately reduce an object simply by holding down the Shift key while 
dragging. As 
it is, holding down the Shift key while dragging changes the object to be a 
square, which doesn't seem all that useful.
Steve Goldberg
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can one manually resize an object proportionately?

2005-04-10 Thread Howard Bornstein
On Apr 10, 2005 7:58 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Thanks, Malte for your suggestions.   However, in this case what I am
> suggesting is that rather than having to type in numbers to resize an
> object proportionately, there needs to be some way to do this manually, such
> as holding down the Shift key while doing the resizing (like in Photoshop), 
> which I
> don't see is a feature of Revolution.   

Here's a quick and dirty way to do what you want. I'm sure someone can
come up with a more elegant method.

In your stack script put this handler:

on mousemove
  global gRatio,gObject
  if the optionkey is down then
put empty into gRatio
  end if
  if there is a selectedobject then
if the selectedobject <> gObject then
  put empty into gRatio
end if
put the selectedobject into gObject
put the width of gObject into tWidth
put the height of gObject into tHeight

if gRatio is empty then
  put tWidth/tHeight into gRatio
end if

if the commandkey is down then
  set the width of gObject to (the height of gObject * gRatio)
end if
  end if
  pass mousemove
end mousemove

You hold down the commandkey to resize proportionally given the
exisiting proportions. If you want to change the proportions, then
hold down the option key while you change them. Then use the
command-key to resize proportionally to the new proportions (is this
getting confusing)?

Of course, you have to use the selection tool, not the browse tool.

Unfortunately, holding the shift key forces the sides of the object to
always be equal. The mousemove handler can't override this. :-(

-- 
Regards,

Howard Bornstein
---
www.designeq.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Can one manually resize an object proportionately?

2005-04-10 Thread Malte Brill
Hi Steve,
ok. I thought about it for a while and scripted a little quirky 
version. It works relatively good. Hold down the commandKey while 
resizing.

Hope it helps.
With libRMC in use try this in your stacks script (mind linewraps!):
on moveControl
  set the isLeftObj of this cd to the left of the selectedObject
  set the isTopObj of this cd to the top of the selectedObject
  set the isrightObj of this cd to the right of the selectedObject
  set the isbottomObj of this cd to the bottom of the selectedObject
end moveControl
on selectedObjectChanged
  if the selectedObject is empty then pass selectedObjectChanged
  put the selectedObject
  set the isLeftObj of this cd to the left of the selectedObject
  set the isTopObj of this cd to the top of the selectedObject
  set the isrightObj of this cd to the right of the selectedObject
  set the isbottomObj of this cd to the bottom of the selectedObject
end selectedObjectChanged
on resizeControl
  if the commandKey is down then
if the mouseH>the isLeftObj of this cd then
  put the isLeftObj of this cd into x1
  put the mouseH into x2
  set the leftFlag of this cd to true
else
  put the isrightObj of this cd into x2
  put the mouseH into x1
  set the leftFlag of this cd to false
end if
if the mouseV>the isTopObj of this cd then
  put the isTopObj of this cd into y1
  put the mouseH into y2
  set the topFlag of this cd to true
else
  put the isbottomObj of this cd into y2
  put the mouseH into y1
  set the topFlag of this cd to false
end if
if libRMC is not in the stacksInUse then
  answer "You must start using libRMC for this handler to work"
end if
set the aspectScale of the selectedObject to x1,y1,x2,y2,false
if the topFlag of this cd then
  set the top of the selectedObject to the isTopObj of this cd
else
  set the bottom of the selectedObject to the istopObj of this cd
end if
if the leftFlag of this cd then
  set the left of the selectedObject to the isLeftObj of this cd
else
  set the right of the selectedObject to the isleftObj of this cd
end if
set the isLeftObj of this cd to the left of the selectedObject
set the isTopObj of this cd to the top of the selectedObject
set the isrightObj of this cd to the right of the selectedObject
set the isbottomObj of this cd to the bottom of the selectedObject
  else
set the isLeftObj of this cd to the left of the selectedObject
set the isTopObj of this cd to the top of the selectedObject
set the isrightObj of this cd to the right of the selectedObject
set the isbottomObj of this cd to the bottom of the selectedObject
pass resizeControl
  end if
end resizeControl
@Marty:
Holding down the shiftkey resizes a control in a quadratic ratio. I 
like it as a feature even though I agree it should be the other way. 
Maybe you should enter a request into Bugzilla.

Cheers,
Malte
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: # Can one manually resize an object proportionately?

2005-04-10 Thread Marty Billingsley
Malte Brill <[EMAIL PROTECTED]> writes:
>
> Hi Steve,
>
>  >Although one can go into the Revolution property inspector and do some
>  >calculation to resize an object proportionately, e.g. to say 1/3 the
> size, when
>  >trying to do this manually I do not see a way to control the resizing
>  >proportionately.
>
> You can easiely write a function to do it and do your resizing with the
> messageBox.

Yes, but why should you have to do that?  All other Mac apps that I work
with will resize an object proportionately if the shift key is held
down as the corner handle is grabbed.  Why on earth doesn't RR do this?
Is there a reason, or is it an oversight?  (Is it a feature or a bug?)

Seems like every time I ask a question like this, it turns out there's
a thought-out reason that RR is implemented the way it is.  (Such as,
I asked why it's the default to have images revert to their original
sizes and positions unless locked, and it turns out that that was a
deliberate decision, not a bug the way I thought it was.)

Anyway, is there a reason that Shift-drag doesn't resize proportionately,
or is it an oversight?

cheers,
  - marty

--
Marty Billingsley ([EMAIL PROTECTED])
The University of Chicago Laboratory Schools
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Can one manually resize an object proportionately?

2005-04-10 Thread Stgoldberg
Thanks, Malte for your suggestions.   However, in this case what I am 
suggesting is that rather than having to type in numbers to resize an object 
proportionately, there needs to be some way to do this manually, such as 
holding down 
the Shift key while doing the resizing (like in Photoshop), which I don't see 
is a feature of Revolution.   In that way, one can do the resizing on the fly, 
eyeballing whether or not the object is the right size for the card, rather 
than having to experiment with different numbers until the size seems right. So 
if anyone has way of doing this, I'd certainly like to hear about it. Thanks.
Steve Goldberg

In a message dated 4/10/05 12:23:47 AM, 
[EMAIL PROTECTED] writes:


> From: Malte Brill <[EMAIL PROTECTED]>
> Subject: Re: # Can one manually resize an object proportionately?
> To: use-revolution@lists.runrev.com
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain;    charset=US-ASCII;    format=flowed
> 
> Hi Steve,
> 
> >Although one can go into the Revolution property inspector and do some
> >calculation to resize an object proportionately, e.g. to say 1/3 the
> size, when
> >trying to do this manually I do not see a way to control the resizing
> >proportionately.
> 
> You can easiely write a function to do it and do your resizing with the
> messageBox.
> 
> If you like to take a look at libRMC (a small Multimedia Library I
> wrote) you can save a bit of work. :-)
> 
> You will need to put the stack in the messagepath (start using stack
> "libRMC")
> 
> If you want to find out what other features it offers type
> 
> libRMCInfo
> 
>   into the messagebox.
> 
> From the docs:
> 
> aspectScale left,top,right,bottom[,setLockLoc]
> 
> set the aspectScale of img "myImage" to 100,100,400,400,true
> set the aspectScale of fld "myField" to the rect of grc "myGraphic"
> 
> setting the aspectScale of a control scales it in the correct
> width-to-height ratio to the biggest dimensions possible to fit in the
> specified rectangle. you can specify if the lockLoc of the control
> should be set to avoid unwanted resizing when closing/reopening cards.
> 
> 
> You find the library here:
> 
> http://www.derbrill.de/librmc/libRMC.rev.zip
> 
> The docs:
> 
> http://www.derbrill.de/librmc/docs.pdf
> 
> Cheers,
> 
> 

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: # Can one manually resize an object proportionately?

2005-04-09 Thread Malte Brill
Hi Steve,
>Although one can go into the Revolution property inspector and do some
>calculation to resize an object proportionately, e.g. to say 1/3 the 
size, when
>trying to do this manually I do not see a way to control the resizing
>proportionately.

You can easiely write a function to do it and do your resizing with the 
messageBox.

If you like to take a look at libRMC (a small Multimedia Library I 
wrote) you can save a bit of work. :-)

You will need to put the stack in the messagepath (start using stack 
"libRMC")

If you want to find out what other features it offers type
libRMCInfo
 into the messagebox.
From the docs:
aspectScale left,top,right,bottom[,setLockLoc]
set the aspectScale of img "myImage" to 100,100,400,400,true
set the aspectScale of fld "myField" to the rect of grc "myGraphic"
setting the aspectScale of a control scales it in the correct 
width-to-height ratio to the biggest dimensions possible to fit in the 
specified rectangle. you can specify if the lockLoc of the control 
should be set to avoid unwanted resizing when closing/reopening cards.

You find the library here:
http://www.derbrill.de/librmc/libRMC.rev.zip
The docs:
http://www.derbrill.de/librmc/docs.pdf
Cheers,
Malte
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Can one manually resize an object proportionately?

2005-04-08 Thread Stgoldberg
Although one can go into the Revolution property inspector and do some 
calculation to resize an object proportionately, e.g. to say 1/3 the size, when 
trying to do this manually I do not see a way to control the resizing 
proportionately.   In Photoshop, for instance, holding down the Shift key while 
doing the 
resizing insures that that picture resizes proportionately.   Is there a way 
of doing something similar in Revolution?   That would save time.   Thanks.
Steve Goldberg
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution