-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #450 from ndw/svg-in
Support SVG height and width properties with units
- Loading branch information
Showing
4 changed files
with
1,058 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" class="no-js"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement)</script><title>SVG Graphic Dimensions</title><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link href="https://purl.org/dc/elements/1.1/" rel="schema.dc"/><meta content="2011-04-22T17:02:00-06:00" name="dc.modified"/><meta content="DocBook xslTNG" name="generator"/><link href="./css/docbook.css" rel="stylesheet" media="screen"/></head><body class="home"><nav class="top"></nav><main><article class="article component"><header><h1>SVG Graphic Dimensions</h1><div class="author"><h3><span class="first-last personname"><span class="firstname">Frank</span> <span class="surname">Steimke</span></span></h3></div></header><p>Check scaling an svg image where Dimensions are given in SVG file in Inches: <code><sgv | ||
width="24.09375in" height="9.40625in"></code>. The image is created by the | ||
<span class="productname">MagicDraw</span> UML Software.</p><p><a href="https://github.com/docbook/xslTNG/issues/432" class="link">Issue 432</a> is that | ||
the generated HTML creates an <code>img</code> with wrong size: | ||
<code>style="width:144px;height:96px;"</code> (which is <code>1.5in x 1.0in</code>). </p><p>Function <code>f:object-properties</code> in <code class="filename">objects.xsl</code> uses the | ||
external function <code>ext:image-metadata</code>, which seems to fail when dimensions in an | ||
SVG file are given as value with units.</p><div id="R_informaltable1" class="informalobject informaltable"><table><colgroup><col style="width: 40%"/><col style="width: 20%"/><col style="width: 20%"/><col style="width: 20%"/></colgroup><thead><tr><th class="bleft btop colsep left rowsep"></th><th class="btop center colsep rowsep" colspan="2">Original Size</th><th class="btop colsep right rowsep">Scaled 25%</th></tr><tr><th class="bleft colsep left rowsep"></th><th class="colsep right rowsep">Inch</th><th class="colsep right rowsep">px</th><th class="colsep right rowsep">px</th></tr></thead><tbody><tr><td class="bleft btop colsep left rowsep">Height</td><td class="btop colsep right rowsep">9,40625</td><td class="btop colsep right rowsep">903</td><td class="btop colsep right rowsep">226</td></tr><tr><td class="bleft colsep left rowsep">Width</td><td class="colsep right rowsep">24,09375</td><td class="colsep right rowsep">2313</td><td class="colsep right rowsep">578</td></tr></tbody></table></div><div id="R_fig1" class="figure formalobject"><div class="mediaobject"><div class="media image"><span class="viewport-table"><span class="viewport-row"><span class="viewport-cell" style="vertical-align:middle;"><span><span class="viewport"><picture class="imageobject"><img src="media/EvidenceRequest.svg" style="width:578px;height:226px;"/></picture></span></span></span></span></span></div><div class="caption"><p>This is an SVG Image scaled by 25%. Expected Dimensions are 578px x 226 | ||
px</p></div></div><header><div class="title">Figure <span class="label">1</span><span class="sep">. </span>SVG Image scaled by 25%</div></header></div></article></main><nav class="bottom"></nav></body></html> |
Oops, something went wrong.