Merge lp:~inkscape+alexander/inkscape/flatten into lp:~inkscape.dev/inkscape/trunk

Proposed by Alexander Brock
Status: Needs review
Proposed branch: lp:~inkscape+alexander/inkscape/flatten
Merge into: lp:~inkscape.dev/inkscape/trunk
To merge this branch: bzr merge lp:~inkscape+alexander/inkscape/flatten
Reviewer Review Type Date Requested Status
Martin Owens ui review Needs Fixing
Review via email: mp+260791@code.launchpad.net

Description of the change

1. I changed the behaviour of "Path->Stroke to Path": It now recurses into groups and creates a duplicate of any object which has a visible fill, so you end up with a visually unchanged document.
2. I added "Path->Remove Overlap": It removes all overlap of the selected objects, resulting in a visually (nearly) unchanged document where objects don't overlap
3. I added "Object->Clip->Intersect": It replaces every selected object by the intersection of the object and all clipping paths affecting the object or it's ancestors.
4. I added "Edit->Clone->Unlink Clones recursively": It recurses into groups and unlinks every clone it finds, including clones used as clipping paths.

To post a comment you must log in.
Revision history for this message
Martin Owens (doctormo) wrote :

Stroke to Path should probably be renamed to make it more obvious that it will preserve fills. "Detach Stroke" perhaps.

Path -> Remove Overlap should not be in the menu but in the align and distribute interface. A button at the bottom with the other distribution and shuffling options.

Unlink Clones recursively is really long, maybe "Unlink All Clones" would be better and make sure it deals with both multiple selected objects and groups.

review: Needs Fixing (ui review)
Revision history for this message
su_v (suv-lp) wrote :

On 2015-06-02 07:56 (+0200), Martin Owens wrote:
> Path -> Remove Overlap should not be in the menu but in the align and
> distribute interface. A button at the bottom with the other
> distribution and shuffling options.

Path -> Remove Overlap is a (recursive) path operation which does not
change the position of the selected objects. IMvHO it should _not_ be
moved to the Align & Distribute dialog: None of the features in Align &
Distribute edit in any way the geometry of the aligned or distributed
objects; 'Path > Remove Overlap' however does edit the geometry of
overlapped objects (it subtracts the part overlapped by another object).

Revision history for this message
Martin Owens (doctormo) wrote :

I agree with su_v here. I first imagined it was dealing in objects. Ignore that bit.

Although the align and distribute dialog does have path alignment options. We should consider expanding it from the 4 buttons it currently has.

Revision history for this message
Alexander Brock (brock-alexander) wrote :

On 02/06/15 07:56, Martin Owens wrote:
> Review: Needs Fixing ui review
>
> Stroke to Path should probably be renamed to make it more obvious that it will preserve fills. "Detach Stroke" perhaps.

I'm ok with that, how are decisions about such changes made in the
Inkscape project?

> Unlink Clones recursively is really long, maybe "Unlink All Clones" would be better and make sure it deals with both multiple selected objects and groups.

"Unlink All Clones" sounds to me like it would unlink any clone in the
document regardless of if it's selected or not.

It deals with clones of groups of clones of objects etc., does that
answer the question?

Revision history for this message
Martin Owens (doctormo) wrote :

Changes in inkscape are done on trust and review. We can implement changes as we want, but we will also often review the changes for each other.

"Unlink Selected Clones" maybe?

Revision history for this message
Martin Owens (doctormo) wrote :

Did this feature go into trunk already? Should we close this review?

Revision history for this message
Alexander Brock (brock-alexander) wrote :

> Did this feature go into trunk already? Should we close this review?

I built the latest Inkscape version from trunk (15146) and checked if the features I added are present in it.

These functions are present:

- Stroke to path now keeps the fill like I want it.

These aren't (or I couldn't find them):

- There's no function which unlinks clones even if they are in groups or clone of clones or similar.
- There is no function to intersect clipped paths with their clipping path
- There is no function for removing overlap of objects using difference operations (the resulting vector should look exactly like before but without overlapping areas)

I am willing to modify the code once more so it works with the current Inkscape trunk version if we can figure out the names for the functions so it can be merged and doesn't rot for another year.

Revision history for this message
Martin Owens (doctormo) wrote :

I'm willing to get the requests merged. Although for each of the items, if they can be separated out, it makes it easier to review and test the new changes.

Thanks for having a look and comparing it to trunk.

Revision history for this message
Mc (mc...) wrote :

I think only 1. is in trunk

Revision history for this message
Alexander Brock (brock-alexander) wrote :

> I'm willing to get the requests merged. Although for each of the items, if
> they can be separated out, it makes it easier to review and test the new
> changes.

I checked out current trunk and startet to port my features so it works with the current trunk. Some stuff in Inkscape::Selection was fundamentally changed, some of my old code works with g_slist-functions so it's more than copy-paste.

Unfortunately, RL shows its ugly face so this may take some time but I'm working on it.

Revision history for this message
Martin Owens (doctormo) wrote :

Thanks for working on it, the selection code has been re-factored recently and several merge requests have gone through the same process of re-basing to trunk. You might be able to find some clues if you examine recent 'Merged' status merge requests.

Unmerged revisions

13769. By Alexander Brock

Fixed removal of overlap and intersection with clipping paths

13768. By Alexander Brock

Merge lp:inkscape

13767. By Alexander Brock

Merge with lp:inkscape

13766. By Alexander Brock

Fixed a problem with path effects and intersections when intersecting paths with their clipping paths

13765. By Alexander Brock

Added recursive unlinking

13764. By Alexander Brock

Unlink clipping paths before intersection

13763. By Alexander Brock

Removed debug messages

13762. By Alexander Brock

Fix a object offset error in overlap removal. Lesson learned: Don't make copies by hand, use sp_selection_duplicate.

13761. By Alexander Brock

Fixed the "remove overlap" method

13760. By Alexander Brock

Added comments to the overlap removal method, still not working

Diff calculation failed

Calculating the branch diff failed. You can manually schedule an update if required.