
bulia byak wrote:
I got an idea today which I went on to quickly implement, so you can test it in CVS already.
Now when you import a bitmap into your drawing, it appears not as an <image> element but as a <rect> with pattern fill, the pattern being the image you imported. It looks the same, but the important difference is that you can easily "mask" the image by changing the shape of the rect (round corners, or convert to path and node-edit, or apply some booleans etc. just as you would with any rectangle). I think this makes it a lot more useful and I would even suggest making this a default (as it is now in CVS), although an option to create <image> as before still remains.
There are a bunch of bugs related to pattern fills currently, but I hope to clear them sooner or later. For now, set Transforms to Preserve in the preferences so that rects behave as expected when transformed.
I'd like to hear opinions on the usefulness and possible default-ness of this trick. It does not remove the necessity to have a pattern fill tool or dialog, but I think it lets you do without in the majority of situations. You can even apply the same pattern fill to other shapes by doing Copy/Paste Style (the imported rect ends up grouped as of now, so ungroup it first).
This currently makes image imports useless to me. There are several problems that I see....
1) The image's top-left is not aligned with the rect's top-left. Currently the image's top-left is (usually) in the center of the rect.
2) When the rect is grown, the image is tiled to fit the rect. It should cover the rect exactly and completely -once-.
2) Image transparency is broken. The background of the rect is copied onto whatever is behind it. I do not know how to fix this. If the image it placed upon an invisible rect, isn't the entire image invisible also? The rect would have to be 0% opaque on the transparent parts, and whatever the user wants on the rest (default 100%). It would basically need to be a matte fill, or the alpha-blend algorithm.
This is a great idea, but I can't use it right now. I'd like to keep using the current CVS, but is there a way I can back this change out just for myself?
Bob