bulia byak wrote:
On 3/20/06, Andrius Ramanauskas <knutux@...400...> wrote:
But that does not solve same issue for multiple items which are masked/unmasked. So, quickest solution I see - if mask is beeing applied to multiple items, make an ordinary group and apply mask to it.
I think there's a better solution. If a user wants a group masked, he can always group it himself before clipping. Instead, I propose this: when you mask several objects by one common mask, just create a separate mask for each object being masked, i.e. copy the clippath/mask as many times to the defs as necessary. This will prevent sharing the clippath/mask among objects, which will likely have many issues. If you really need several objects with one shared mask, group them yourself.
Before I really begin, let me comment that masks and clippaths are things that I use in a significant portion of my work. Let me also say sorry before-hand if I misinterpret things and kinda go off on a tangent about it.
I think that reusing masks and clippaths is smarter than the duplicating that you speak of. I'll go into that further below...
One thing has become apparent though, you seem to be against the "auto-grouping" that other apps do. Why is that? It just doesn't make sense to me for you to have such a strong opinion considering you said you don't even use the feature that often. You obviously didn't use it enough to know that either Xara or AI could edit both clipped objects and their clipping paths while the clip is still applied. I can tell you that I now use clipPaths in 90% of my illustration work and roughly 50% of my design work (100% if you want to include our monogram that is clipped and used on all marketing materials). Honestly, the auto-group that the other programs do makes sense, especially with illustration. From my perspective, when you are clipping multiple objects it's generally because you want the result to be a new "entity".
I'll use my common illustration example to try and explain. If I am drawing a leg, and I have a bunch of objects on top of it that are layered for highlights and shading, when I clip or mask all of these, it's because I want the whole thing to be treated as one object (with restricted view). When I clip it... that's now the leg. If I move said leg, all highlights and shadows need to transform with the leg. It's not too far out there to ask considering AI, Xara, Freehand & Flash do it (and I bet Corel Draw and other programs do as well).
I am starting to think that we're going to need a separate page in Inkscape's Preferences for all of the Clipping & Masking options because the way you want to use them is probably not the way most other people will. Most people coming from other software will expect the auto-grouping and probably other things which we haven't thought of or run across.
Correspondingly, when you unmask/unclip, right now it checks whether the same mask is used by other objects, and if it's not, it's moved from defs to the canvas. Instead, I think it should _always_ create a copy of the clippath/mask object for _each_ unmasked object, and then delete those masks in defs that are not used anymore. So, if you unmask several masked objects, you get the corresponding number of mask objects - which may or may not coincide, depending on whether the objects have aquired different transforms since being clipped/masked.
If I'm understanding correctly, this is a bad solution. I do complex work, often with thousands of objects. I'm planning on going back to re-do effects on Gaze and a number of other pics down the line and I have some pretty wild ideas about how I want to do it. One of them involves masking sections of hair... there are THOUSANDS of strands of hair. This will murder my file to have thousands of masks in defs, inkscape will crawl handling said file, and then what if I want to re-mask a section? Have hundreds to thousands of masks show up on canvas on an unmask? This just sounds like it will be a usability nightmare. And no... pre-grouping sections shouldn't be necessary to avoid it as it isn't with other programs.
Additionally, Andrius had talked about having a dialog that will allow you to apply existing clippaths and masks to other objects, groups, or layers... this will then be impossible. I for one look forward to being able to mask or clip an entire layer easily... or another group, or object or whatever. I also look forward to having the ability to add or remove items to/from clipping and masking objects via the dialog as well (adding additional paths or masks to make compound paths/masks for example).
I think this will resolve it in the most logical and flexible way. What do others think?
I don't have an alternative solution, but it doesn't seem like the most logical or flexible way. It seems like it will be painful performance and filesize wise if people have complex documents.
Here are a couple more things to do:
- When ungrouping a clipped/masked group, copy the clippath/mask once
for each ungrouped object and apply, so that the objects remain clipped as they were before
Am I wrong in thinking that this will exponentially increase filesize and as a result hurt Inkscape performance with really complex documents?
- When converting anything to path, carry over the clippath/mask attributes
This makes sense.
Again, sorry if I am mistaken or misunderstand things.
-Josh