[Ipe-discuss] How to resize image to specific length
otfried at ipe.airpost.net
Tue Oct 11 22:50:06 CEST 2016
Actually I just realize that there is a simple solution. The problem
arises because when you drag the top-right corner, Ipe assumes you want
to scale from the bottom-left corner. The trick is to first tell Ipe
that you want to scale with the top-left corner as the origin, and then
drag the top-right corner.
1. Turn on vertex snap (F4) and control point snap (Shift-F4),
2. Grab the top-left corner of the image and translate to the target
3. Press F1 to set the origin at the top-left corner
4. Turn off angular snapping (F8)
5. Select stretch mode
5. Hold the Shift-key (for scale mode) and grab the top right corner.
Drag it to the target position. The image will scale as you want,
keeping the aspect ratio constant.
I can still try to change the way that scale mode computes the scale
factor, if nobody objects.
On Tue, Oct 11, 2016, at 17:02, Nikolaus Rath wrote:
> Hi Otfried,
> Thanks, will try that procedure!
> For making it more intuitive: can't you just make the scale factor
> proportional to the movement along *one* axis (e.g. the one where most
> of the movement happens)?
> It seems to me that if you have the diagonal defined, and want to scale
> along that, than it is trivial to convert this to the corresponding
> movement on one axis. On the other hand, if you have the scaling along
> one axis then it's much harder to obtain the corresponding diagonal...
> On 10/08/2016 06:49 AM, Otfried Cheong wrote:
> > Yes, this is not as easy it might be - I noticed this several times.
> > The problem is that in scale mode, the scaling factor is simply
> > determined by the ratio by which you move the cursor (as seen from the
> > scaling origin), so, as you say, the corner "drags behind", unless you
> > move exactly on the diagonal.
> > I'm open for suggestions for how scale mode could be more intuitive.
> > Right now, what works is the following:
> > With vertex snapping (F4) on, do:
> > Translate the top left corner of the image to its target position.
> > Then, go to the *target* top right corner and draw a vertical auxiliary
> > line downwards from there.
> > Go back to the top left corner and set the coordinate system there (F1).
> > Go to the bottom right corner of the image and set the direction (F2).
> > This will set the main coordinate direction to be the diagonal of the
> > image.
> > Turn on boundary snapping (F5). Use scale mode to drag the bottom
> > right corner of the image to the intersection of the coordinate axis
> > and the auxiliary line (since both boundary and angular snapping are
> > on, the cursor will snap to this intersection point).
> > Cheers,
> > Otfried
> > On Fri, Oct 7, 2016, at 18:44, Nikolaus Rath wrote:
> >> Hello,
> >> I would like to re-size an image to a specific length (or height), while
> >> keeping the aspect ratio preserved.
> >> How do I do that?
> >> My naive attempt was to grab the left upper corner of the image (using
> >> control point snapping) and move it to the desired location. Then I'd
> >> grab the right upper corner with the resize tool, hold shift, and move
> >> it horizontally to the desired position (using grid snapping).
> >> Unfortunately this does not work. While the cursor snaps to the current
> >> position, the corner of the image actually "drags behind", so it ends up
> >> larger than it should be.
> >> Best,
> >> -Nikolaus
> >> _______________________________________________
> >> Ipe-discuss mailing list
> >> Ipe-discuss at lists.science.uu.nl
> >> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss
> > _______________________________________________
> > Ipe-discuss mailing list
> > Ipe-discuss at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/ipe-discuss
> Nikolaus Rath, Ph.D.
> Senior Scientist
> Tri Alpha Energy, Inc.
> +1 949 830 2117 ext 211
> Ipe-discuss mailing list
> Ipe-discuss at lists.science.uu.nl
More information about the Ipe-discuss