On Thu, Sep 26, 2013 at 02:30:23AM -0700, ian_bruce@...2136... wrote:
On Wed, 25 Sep 2013 19:40:00 -0700 Bryce Harrington <bryce@...961...> wrote:
I've had some vague thoughts that maybe this could benefit from allowing multiple factors, for like if you're designing for multiple website screen sizes, or for multiple cell phone displays. I'm a bit hand wavey about how this might work, but I guess it'd be like laying out your UI and then toggling different screen sizes and then [insert something interesting happening].
How about this: you dimension your drawing either in "px", or some made up unit, "yunits" or "metors" or something. Then you have some control, both in the Inkscape UI and the saved SVG file, which defines that unit relative to either real physical lengths or pixels. If your cell phone display changes size or resolution, you adjust that definition, and the drawing rescales automatically.
Perhaps not ideal, but using SMUUs does sound like the practical solution to this.
That would probably require some extension to the SVG specification, so in the absence of that, perhaps something could be done with "viewBox".
It seems to me that <g transform="scale(x)"> nodes, possibly with Inkscape-specific attributes, could be used to control the relationship between document/image/display units, for the SVG tree, but this would require further thought.
That seems sensible.
This could permit having multiple unit systems in the drawing itself, each under a different <g>. So I guess for example, we can imagine a road map at scale 100km:1cm, but which includes highlight bubbles (perhaps rotated 90dgr to the main map) showing details of a few towns at a closer scale of 1km:1cm.
It would help if we could introduce a new attribute to specify the default unit for the node it belongs to and all its descendents. So you could write <g unit="km" transform="scale(1.0E-7)"> ... </g> , and specify all the elements of that group in kilometres, without actually using any unit suffix, and the whole thing would display at a scale of 100km:1cm .
The meaning of "km" would have to be defined in "units.xml" or some other place; it isn't in the SVG specification.
Right, because of that I don't think we can legally use km's there. So in the document SVG itself, the elements would have to be recorded in document units - cm's in this case. The user-visible units would be given as inkscape attributes, which we'd implement in inkscape initially like <g inkscape:scaling-factor="1.0E-7km:1cm"> or something equivalent.
I wonder if perhaps what we should do here is ignore SVG's units and consider the three (or more) use cases that users have, and think from their POV what would work best.
I agree with that. Decide first what the Inkscape UI should be like, and how it should control exported image sizes, and figure out later how to map that onto standard (or proposed, as <tavmjong@...8...> says) SVG.
Sounds good. We should also survey how other apps do this, since this may well be a problem someone else has already come up with a good design for.
What other vector graphics editors are important, or competitive with Inkscape? Adobe Illustrator? Karbon? Xfig? Is XaraLx still relevant?
For this, need to look beyond just illustration, so Visio, AutoCAD, Libreoffice Draw, etc. Might find some good ideas in mapping software (esp. ones that converse in svg), or architectural drawing programs.
Establish different unit systems "modes" and let the user toggle which units mode to use in the Inkscape UI while drawing.
Does it really require "modes", or does allowing the user to explicitly control the screen/drawing/export unit ratios provide all the control that is actually needed?
Well, I'm just thinking that Inkscape's going to show coordinates as something like (50mm, 250mm), but we need some way to make it obvious to the user whether those measurements are in reference to the screen, the printed page, or the real world.
Next to the object size/position number boxes at the top edge of the Inkscape window, is a selection list which controls which units they are displayed in. We can add another selection list which controls whether the values displayed are relative to the screen, drawing, or export scales.
Maybe, yeah. The window chrome is already so crowded with cruft though, and this feature will be relevant to a pretty distinct audience so I'm uncertain that adding it as another edge widget is ideal. Not that I have a better idea to suggest though...
Bryce