Pixel is only for monitors. If you want a 1 pixel line you don't need to care about dpi. That only matters if you want to print. When you print a pixel becomes a dot.

Attached is an example with a 1 pixel thick line. Of course, the thickness you see in the monitor depends on the zoom you use. If you open the image with Gimp and zoom in to 1600% you will see that the line thickness corresponds, on the left scale, to 1 pixel.

Maybe you can clarify your question?

On 7/8/13 10:10 AM, Massimo wrote:
Hi all.
I am producing a PNG file and I'm using an xsl with SVG element like this:

<fo:instream-foreign-object>
   <svg:svg xmlns:svg="http://www.w3.org/2000/svg"; width="100%"
height="100%">
     <svg:line x1="15" y1="15" x2="25" y2="15"/>
     <svg:line x1="15" y1="16" x2="25" y2="16"/>
   </svg:svg>
</fo:instream-foreign-object>

I need to draw 1 pixel thin lines.
I set the target resolution to 203dpi and I noticed that the pixel of the
lines is scaled (bigger) according the resolution (~3px thin).

Is there any way to control the svg pixel size via program or configuration
leaving  the resolution to 203dpi?

Thanks.




--
View this message in context: 
http://apache-fop.1065347.n5.nabble.com/SVG-pixel-size-tp38853.html
Sent from the FOP - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master page-width="100px" page-height="100px" master-name="first">
      <fo:region-body />
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="first">
    <fo:flow flow-name="xsl-region-body">
        <fo:block space-before.optimum="15pt">
<fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg";>
<svg:svg width="50px" height="50px">
  <svg:g style="stroke:#000000; stroke-width:1px">
     <svg:line x1="5px" y1="5px" x2="50px" y2="5px"/>
  </svg:g>
</svg:svg>
</fo:instream-foreign-object>
        </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

<<attachment: test.png>>

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to