On Fri, 11 Feb 2005 09:34:57 -0600, Edward Flick <eddy@...690...> wrote:
I definetely see your point, but the reason I'm doing this is so Inkscape can also be used as a template engine, with no predetermination of image size involved in image element creation. Not that just modifying the SVG would be grossly complex, but for the people making the layouts, it would be harder (at least that is the case here).
I really don't see why it would be so difficult to scale an image with the mouse, optionally with Ctrl for uniform scaling. It's entirely consistent with all other object types and gives you no surprises. You see what you get, and it's entirely valid SVG.
What if there was just a drop down called "Scale" with options: "Stretch", "Fit (centered)", "Fit (top left)", "Fit (top)", "Fit (top right)","Fit (right)","Fit (bottom right)", "Fit (bottom)", "Fit (bottom left)", "Fit (left)", "Fill (centered)", "Fill (top left)", "Fill (top)", "Fill (top right)","Fill (right)","Fill (bottom right)", "Fill (bottom)", "Fill (bottom left)", and "Fill (left)"? I think these options could be set very quickly, and undoing them would be as easy as going back to "Stretch".
Wow, for one thing, you see yourself that there are a lot of options here. So it would be rather cumbersome if only due to the number of options. But there are other reasons too. This would prompt lots of questions: Centered relative to WHAT? Viewport? What is that? We don't have such a concept elsewhere. Can I visualize this viewport? How can I affect its size or placement? Why are all these options available only for images and not for other objects? How would they interact with regular scaling/alignment? Did I do anything wrong if I just stretched it with the mouse, as I would stretch a path? etc, etc. An interface that needs so much learning and explanations for such a simple and obvious task is not a good interface.
On the other hand, treating images just like any other objects that can be scaled, moved, aligned with the Align dialog, etc. has the huge advantage that it's consistent everywhere. You learn it once and you don't need to unlearn it for any special cases. Everything is an object and all objects behave the same. It's very important.
So, with regard to preserveAspectRatio support, what I would suggest is this:
Add a new tab to the Object properties dialog. Call it "Advanced". There, we would place all the "semantic" SVG attributes such as preserveAspectRatio (they would be enabled/disabled depending on the type of the selected object, of course). These attributes would be given with their exact SVG names and lists of values as per the standard, with no attempts to reword or simplify them (other than in floating tooltips). This is important because those who are curious can then easily find these attributes in the spec and read up on the cumbersome details of their meaning and interpretation - if they need it. This way, we would provide these facilities for those who really need them, but they won't get in the way of the regular users. Would that work for you?