Scaled clones go out of sync

Bug #168486 reported by Daniel Pope
4
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

I have recently been seeing clones getting mixed up as to stroke thickness
and rounded rectangle corner radius after the clone has been scaled
relative to the original.

This is on somewhat recent SVN.

I have not worked out how to reproduce this.

Zooming, scrolling and transformations do not bring the clones back into
sync with the original; saving and reloading however does.

Are the select/transform tool modifiers getting mixed up in clone
transformations?

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Originator: NO

Thanks for the report, but we obviously need a sample file and steps to
reproduce to debug this bug if it is a bug.

Note that "preserve corners" and "preserve stroke width" modes do not work
on clones. This is because these modes work by compensating the actual
corner radii and stroke width against the transformation so that the end
result remains the same. But clones do not have corners or stroke of their
own; they copy everything from the original. Therefore they always scale
"solid", with everything scaled by the same proportion. This is a
limitation of SVG.

Revision history for this message
Daniel Pope (djpope) wrote :

Originator: YES

Of course. I am expecting clones to be perfect copies of the originals,
and they are immediately after I clone and scale them, but sometime later I
notice some elements of the clone (some shapes within the original group
that has been cloned) picking up the wrong stroke width of rounded
rectangle radius.

I will continue to observe and will report if this becomes reproducible.

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

As previously stated, can you please attach an svg file showing exactly the issue ?

Changed in inkscape:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Daniel Pope (djpope) wrote :

No, it's not exhibited by saved SVG files. Nor is it reproducible.

I have only recently compiled recent Inkscape SVN so I will watch to see if it I notice it again.

Revision history for this message
bbyak (buliabyak) wrote :

out of date

Changed in inkscape:
status: Incomplete → Invalid
su_v (suv-lp)
tags: added: clones transformations
Revision history for this message
su_v (suv-lp) wrote :

Scaling clones together with the original ('Affect: Scale stroke' is off) causes a inverse change of the clone stroke-width when the stroke of the original is unset and the clone has stroke paint and width attributes of its own.

It seems that the compensation of the stroke scaling is applied to the clones twice (once from scaling the original, and a second time from scaling the clone), resulting in unexpected changes of the stroke width instead of keeping it at the original width.

Steps to reproduce:
1) draw a path
2) unset stroke
3) create a clone
4) set stroke paint and stroke width of the clone
5) select both and uniformly scale the selection (using the mouse or the 'Transform' dialog)

Expected result:
The stroke-width of the clones stays unchanged (in accordance with the 'Affect:' setting).

Actual result:
The stroke-width of the clone is decreased if the selection is scaled > 100%, and increased if the selection is scaled < 100%.

Available workarounds:
a) use 'preserved transforms' when scaling a selection containing the original and the clone
b) scale original and clone separately
c) does not occur with shapes that always use preserved transforms (ellipses, stars, spirals)

Note: Using 'Scale stroke width' in above example causes again the reverse effect: the stroke-width of the clone in this case stays unchanged when the transform is applied to a selection containing both the original (stroke unset) and the clone (stroke paint and width set).

While the result can be explained by the way clones work, it still is unexpected for the user why suddenly the stroke-width is scaled in reverse.

Reproduced with Inkscape 0.47 and 0.47+devel r9542 on OS X 10.5.8

Changed in inkscape:
status: Invalid → New
Revision history for this message
su_v (suv-lp) wrote :

correction:
- b) scale original and clone separately
+ b) scale either the original or the clone, but not both

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

With regard to workaround b) 'scale either the original or the clone':

- scaling the original only: as described in comment #1, clones «always scale "solid", with everything scaled by the same proportion.» i.e. the 'Affect: Scale stroke width' setting has no effect on the rendered stroke-width of the clone: it stays unchanged at its initial (absolute) width. The geometry of the clone however follows the 'scale' transform of the original.

- scaling the clone only: the stroke-width of the scaled clone changes according to the 'Affect: Scale stroke width' setting.

Revision history for this message
jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape 0.48.1 and trunk revision 10123.

Changed in inkscape:
status: New → Confirmed
John Smith (john-smithi)
tags: added: precision
Revision history for this message
su_v (suv-lp) wrote :

AFAIU this is not about 'precision' as such.

su_v (suv-lp)
tags: removed: precision
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Hi, this bug has been reported in GitLab: https://gitlab.com/inkscape/inbox/issues/1456

Closing this as part of Inkscape's Bug migration.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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