resize of object or group by entering a numeric size results in a different size.

Bug #190557 reported by Rogier
50
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Diederik van Lierop
Nominated for 0.47.x by su_v
inkscape (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I'm running inkscape 0.45.1-1 on Debian Lenny.

When I resize a group by entering a new width or heigth in the icon-bar, the new size seems to be an approximation of the requested size. After re-entering the same size a second or even more times, the actual size gets progressively closer, and finally reaches (?) the requested size.

In one example, I had a group with a width of 25mm, which I tried to resize to 70mm. After the first try, the width was 69.100. After the second try, it was 69.993. The third time it was 70.000 (but I don't know whether that actually meant 69.99983 ...)

I was using mm as measurement and entry units. Grid was enabled, and so was snapping.

When resizing a simple object (a rectangle), the result is correct after a single try.

Regards,

Rogier.

Revision history for this message
Rogier (rogierg) wrote :
Revision history for this message
Tom Davidson (tjd-mit) wrote :

Not yet confirmed, but may end up being related to bug 174046: "Rectangles do not snap accurately to grid"

Revision history for this message
nightrow (jb-benoit) wrote :

I tried to do what you describe on WinXP with version 0.46 without any bug.
Could you try on version 0.46 ?

A more "step by step" description of your bug could also helps, to be sure to work on the same problem.
Thanks in advance

Revision history for this message
Rogier (rogierg) wrote :

I have retested with version 0.46 on debian Lenny.

After some experimentation I have narrowed it down to a problem related to the stroke width.
The problem occurs when an object which determines one or more of the boundaries of the group has a non-zero stroke width.

I can reproduce it using the following steps:
- Startup Inkscape
- Draw an object (e.g. a rectangle)
- Set its stroke width to something non-zero (preferably not too small)
- Draw a second object (needed to be able to create a group; use non-zero stroke width)
- Create a group containing both objects
- Select the group
- Perform the resize by entering values in the W & H boxes in the icon-bar (see picture 'resize.png' included with the original report)
The group now has different sizes than entered. Re-entering the desired sizes a few times results in progressively better approximations.

The problem also occurs when resizing using the object handles. While dragging, the W & H boxes show the new sizes. After releasing the mouse button, the new dimesions are different from the last values shown.

When the stroke width of the objects is zero, the problem does not occur.

Revision history for this message
Hystrix (hystrix-) wrote :

I think this problem is related to the resize of the objects stroke width. Can you try turning on and off the button that changes the stroke width when you change the object size and see if the problem persist?

Changed in inkscape:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
The Flying Jaco (rmadv3) wrote :

I have had this happen to me as well. However, it did seem to happen to simple lines too. But it's inconsistent. I just tried to replicate this and it went fine without the weird approximations, whether the shape had a stroke or not.

One thing I did do that is different is if I want a shape with a stroke, I first set the stroke to zero, remove the stroke paint, resize it, and then apply the stroke paint and stroke width. When I resized it, there was no strange approximations.

Revision history for this message
su_v (suv-lp) wrote :

Confirmed with Inkscape 0.46+devel r22026 on OS X 10.5.8, happens with single objects (not grouped) as well.

settings: scale stroke width off, use geometric bounding box, snapping off, no visible grid

1) draw rectangle, set precise size while in rectangle tool
2) change to select tool, select rectangle and change width or height values (choose even numbers for easier demonstration)
3) numbers are approximated, only repeated entry of the same new value gets it to stick (3-5 times)

Changed in inkscape:
status: Incomplete → Confirmed
tags: added: ui ui-selection-group-layer
summary: - resize of group by entering a numeric size results in a different size.
+ resize of object or group by entering a numeric size results in a
+ different size.
Revision history for this message
Kjohrf (kjohrf) wrote :

I've had this happen many times. As suv can probably predict, it drives me crazy. :)

I've hit it both when entering numbers manually in the edit box, and when scale objects
(even single objects, not groups), with the arrows. It's like a little game to play to get
the exact size you want.

Note that I have the Transforms preference for "Scale Stroke Width" unchecked.
I think it is resizing the object again to put the stroke width back to the un-scaled size.
It should take this into account as you are scaling the object.

Revision history for this message
su_v (suv-lp) wrote :

Also affects 'Object > Transform… > Scale', using a unit other than %
(reproduced with Inkscape 0.47 and 0.48+devel r9701 on OS X 10.5.8, default preferences)

su_v (suv-lp)
tags: added: selection transformations
removed: ui-selection-group-layer
Revision history for this message
su_v (suv-lp) wrote :

Related reports:
Bug #212768 “Geometric and Visual bounding box and object dimensions”
Bug #398715 “Resizing objects on toolbar is not precise”:
Bug #452102 “Wrong value set when changing the size of a horizontal (or vertical) line”
Bug #706509 “Endpoint of scaled line segment moves”

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Should have been fixed as of today; see the comments in this other bug report: https://bugs.launchpad.net/inkscape/+bug/212768

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

The issue with Object > Transform… > Scale, as reported by ~suv, is still present.

Changed in inkscape:
assignee: nobody → Diederik van Lierop (mail-diedenrezi)
Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Scaling using the transform dialog should now have been fixed too! (as of rev. #10615)

Changed in inkscape:
status: Confirmed → Fix Released
Revision history for this message
pareshchaudhary (chaudharyparesh1986) wrote :

i have face same problem . i have set dimension 3 to 4 times for correct. i have read above post. i also see all change file in rev 10615.

But my problem is that i am using 0.48.2 version of inkscape. so how could i solve this problem.

su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.49
status: Fix Released → Fix Committed
Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

You have three options:
1) wait for v0.49 to be released
2) compile Inkscape yourself
3) download an experimental build, if available: http://inkscape.org/download/

Revision history for this message
pareshchaudhary (chaudharyparesh1986) wrote :

I have download 0.49.it's work but how could i implement same thing in my current 0.48.2 version.

Any path for 0.48.2 version ?

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote : Re: [Bug 190557] Re: resize of object or group by entering a numeric size results in a different size.

You mean that you would like to backport the code from v.0.49 to
v0.48.2? In principle that could be done, if you know a little bit of
programming and compiling. But why would you want to do that? I feel
like I'm misunderstanding you. Anyway, I don't see an easy solution for
you, so why bother if you have already access to v0.49?

On 08/13/2012 08:23 AM, pareshchaudhary wrote:
> I have download 0.49.it's work but how could i implement same thing in
> my current 0.48.2 version.
>
> Any path for 0.48.2 version ?
>

Revision history for this message
pareshchaudhary (chaudharyparesh1986) wrote :

yes i understand, but my mean is that this bug solve in 0.49 version but is
it possible to solve in 0.48 version with any patch.?
Because i have done so many change as per my requirement in source code of
0.48 version so now days migration of 0.49 version to 0.48 it's more
difficult for me .

*Regards,
Chaudhary Paresh*

On Tue, Aug 14, 2012 at 11:20 PM, Diederik van Lierop <
<email address hidden>> wrote:

> You mean that you would like to backport the code from v.0.49 to
> v0.48.2? In principle that could be done, if you know a little bit of
> programming and compiling. But why would you want to do that? I feel
> like I'm misunderstanding you. Anyway, I don't see an easy solution for
> you, so why bother if you have already access to v0.49?
>
> On 08/13/2012 08:23 AM, pareshchaudhary wrote:
> > I have download 0.49.it's work but how could i implement same thing in
> > my current 0.48.2 version.
> >
> > Any path for 0.48.2 version ?
> >
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1034451).
> https://bugs.launchpad.net/bugs/190557
>
> Title:
> resize of object or group by entering a numeric size results in a
> different size.
>
> Status in Inkscape: A Vector Drawing Tool:
> Fix Committed
>
> Bug description:
> I'm running inkscape 0.45.1-1 on Debian Lenny.
>
> When I resize a group by entering a new width or heigth in the icon-
> bar, the new size seems to be an approximation of the requested size.
> After re-entering the same size a second or even more times, the
> actual size gets progressively closer, and finally reaches (?) the
> requested size.
>
> In one example, I had a group with a width of 25mm, which I tried to
> resize to 70mm. After the first try, the width was 69.100. After the
> second try, it was 69.993. The third time it was 70.000 (but I don't
> know whether that actually meant 69.99983 ...)
>
> I was using mm as measurement and entry units. Grid was enabled, and
> so was snapping.
>
> When resizing a simple object (a rectangle), the result is correct
> after a single try.
>
> Regards,
>
> Rogier.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/190557/+subscriptions
>

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

It should be possible; you would probably need to backport at least these four revisions: 10403, 10439, 10433, and 10615. But beware if you want to have a try at this, it might become a mess easily! I wouldn't bother if I were you, this is gonna give you headaches and will cost quite a bit of time.

Revision history for this message
pareshchaudhary (chaudharyparesh1986) wrote :

i have read revision 10615 . i think it's nice solution but some of the
file and class name is not available in my current version.
i am trying to modified but it's so difficult . i need to change and add
new file in my current version (some of source file is not available in my
current version like affine.cpp.affine.h)

so can solve this bug in my current version.
i am really stuck please give me right direction.

*Regards,
Chaudhary Paresh*

On Thu, Aug 16, 2012 at 11:16 PM, Diederik van Lierop <
<email address hidden>> wrote:

> It should be possible; you would probably need to backport at least
> these four revisions: 10403, 10439, 10433, and 10615. But beware if you
> want to have a try at this, it might become a mess easily! I wouldn't
> bother if I were you, this is gonna give you headaches and will cost
> quite a bit of time.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1034451).
> https://bugs.launchpad.net/bugs/190557
>
> Title:
> resize of object or group by entering a numeric size results in a
> different size.
>
> Status in Inkscape: A Vector Drawing Tool:
> Fix Committed
>
> Bug description:
> I'm running inkscape 0.45.1-1 on Debian Lenny.
>
> When I resize a group by entering a new width or heigth in the icon-
> bar, the new size seems to be an approximation of the requested size.
> After re-entering the same size a second or even more times, the
> actual size gets progressively closer, and finally reaches (?) the
> requested size.
>
> In one example, I had a group with a width of 25mm, which I tried to
> resize to 70mm. After the first try, the width was 69.100. After the
> second try, it was 69.993. The third time it was 70.000 (but I don't
> know whether that actually meant 69.99983 ...)
>
> I was using mm as measurement and entry units. Grid was enabled, and
> so was snapping.
>
> When resizing a simple object (a rectangle), the result is correct
> after a single try.
>
> Regards,
>
> Rogier.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/190557/+subscriptions
>

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Sorry, but I am not in a position to help you with this at the moment.
There are many things that can go wrong, but I do not have the time to
look into this.

Revision history for this message
pareshchaudhary (chaudharyparesh1986) wrote :

Thanks for replay .

i have done from select-toolbar.cpp file when user select geometric box
On 8/21/12, Diederik van Lierop <email address hidden> wrote:
> Sorry, but I am not in a position to help you with this at the moment.
> There are many things that can go wrong, but I do not have the time to
> look into this.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/190557
>
> Title:
> resize of object or group by entering a numeric size results in a
> different size.
>
> Status in Inkscape: A Vector Drawing Tool:
> Fix Committed
>
> Bug description:
> I'm running inkscape 0.45.1-1 on Debian Lenny.
>
> When I resize a group by entering a new width or heigth in the icon-
> bar, the new size seems to be an approximation of the requested size.
> After re-entering the same size a second or even more times, the
> actual size gets progressively closer, and finally reaches (?) the
> requested size.
>
> In one example, I had a group with a width of 25mm, which I tried to
> resize to 70mm. After the first try, the width was 69.100. After the
> second try, it was 69.993. The third time it was 70.000 (but I don't
> know whether that actually meant 69.99983 ...)
>
> I was using mm as measurement and entry units. Grid was enabled, and
> so was snapping.
>
> When resizing a simple object (a rectangle), the result is correct
> after a single try.
>
> Regards,
>
> Rogier.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/190557/+subscriptions
>

--

*Regards,
Chaudhary Paresh*

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote : Re: [Bug 190557] Re: resize of object or group by entering a numeric size results in a different size.

Should be in v0.49, which might be released by the end of the year.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Odin Sonnah <email address hidden> wrote:

Do you have any estimate for when this fix might be available in a
stable release version? I’m hesitant to try to install a development
version of Inkscape on my computer, but I would like this fix.

--
You received this bug notification because you are a bug assignee.
https://bugs.launchpad.net/bugs/190557

Title:
resize of object or group by entering a numeric size results in a
different size.

To manage notifications about this bug go to:
https://bugs.launchpad.net/inkscape/+bug/190557/+subscriptions

Revision history for this message
pareshchaudhary (chaudharyparesh1986) wrote :

Hi
i am using 0.48.1 version of inkscape. i face problem for resize object in Geometric box. after some spend time

i just fix this problem in Geometric box not visual.

Find from attachment , i have attach one patch and preference.xml file

Revision history for this message
pareshchaudhary (chaudharyparesh1986) wrote :
Revision history for this message
paul beard (paulbeard) wrote :

/me too on this tedious resizing bug. I am running 0.48.2 on OS X and see this all the time.

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Hi Paul,

You're using a Mac for mechanical engineering? ;-)

Just noticed your message to the devel mailinglist; but you're already aware of this bug and of the geometric vs visual bounding box distinction, so you probably already know everything there is to know...

You'll have to wait for v0.49 to be released, for OS X... Both of which are quite big hurdles!

Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Petrus Adamus (dohnp5a1) wrote :

the problem has not been fixed, it is still present

Changed in ubuntu:
status: Confirmed → Incomplete
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patchforwidthheight.txt" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
paul (paulse) wrote :

This bug is still present in 'Inkscape 0.91 r13725'.
I just put an rectalngle of a size into my A2 document, but it was completely off.

The heigth is set to 2072px but the object is shown as 2350 or something pixels. So completely off... I could fix the width by reentering the value but not the heigth.

Paul White (paulw2u)
affects: ubuntu → inkscape (Ubuntu)
Changed in inkscape (Ubuntu):
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.