automatic ViewBox creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
You can make SVG graphics that are automatically zoomed
to take over available space by adding the attributes
viewBox="0 0 width height" and
preserveAspectR
element, where length and height are as specified by
their attributes in said element . Please include a
checkbox to do so in the document settings.
Also, since there's an apparent bug in Inkview that
makes the main clip path not set properly (content
leaks over page edge), the checkbox should also insert
the attributes overflow="hidden" and
clip-path=
element, and the following code to the defs section:
<clipPath id="mainclip">
<path
id="dummypath1"
d="M 0,0 L width,0 L width,height L 0,height L 0,0"
/>
</clipPath>
This works and properly hides the out-of-page content
in Inkview.
Changed in inkscape: | |
importance: | Undecided → Wishlist |
Changed in inkscape: | |
status: | New → Confirmed |
The attribute overflow="hidden" should not be necessary, as this is the default for SVG: http:// www.w3. org/TR/ SVG11/masking. html#InitialCli ppingPath
And I think the creation of a clip path is a bit overhead. When clipping to the viewBox is wanted, Inkscape should add an according "clip" attribute, as described in http:// www.w3. org/TR/ SVG11/masking. html#AutoClipAt ViewportNotView Box
But the automatic viewBox creation is of course the most urgent and has been requested many times.