]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bugs in presentation of graphic width/height
authorNorman Walsh <ndw@nwalsh.com>
Wed, 22 Jan 2003 20:12:06 +0000 (20:12 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 22 Jan 2003 20:12:06 +0000 (20:12 +0000)
xsl/html/graphics.xsl

index d6fd59eed2467c30278638e64a7fc5691fddd096..dd20b16f5d3cd0fa169ac080438cfc0a7b2b6821 100644 (file)
             <xsl:with-param name="em.size" select="$points.per.em"/>
           </xsl:call-template>
         </xsl:variable>
-        <xsl:value-of select="$width.in.points div 72.0 * $pixels.per.inch"/>
+        <xsl:value-of select="round($width.in.points div 72.0 * $pixels.per.inch)"/>
       </xsl:when>
       <xsl:otherwise></xsl:otherwise>
     </xsl:choose>
             <xsl:with-param name="em.size" select="$points.per.em"/>
           </xsl:call-template>
         </xsl:variable>
-        <xsl:value-of select="$depth.in.points div 72.0 * $pixels.per.inch"/>
+        <xsl:value-of select="round($depth.in.points div 72.0 * $pixels.per.inch)"/>
       </xsl:when>
       <xsl:otherwise></xsl:otherwise>
     </xsl:choose>
@@ -579,6 +579,7 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
                 <xsl:attribute name="style">
                   <xsl:text>height: </xsl:text>
                   <xsl:value-of select="$html.depth"/>
+                  <xsl:text>px</xsl:text>
                 </xsl:attribute>
               </xsl:when>
               <xsl:otherwise>
@@ -707,8 +708,8 @@ valign: <xsl:value-of select="@valign"/></xsl:message>
         </xsl:when>
 
         <xsl:when test="$scaled.contentdepth != '' and $html.depth != ''">
-          <xsl:attribute name="width">
-            <xsl:value-of select="$html.width"/>
+          <xsl:attribute name="height">
+            <xsl:value-of select="$html.depth"/>
           </xsl:attribute>
         </xsl:when>
       </xsl:choose>