xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guess Who <davej...@yahoo.com>
Subject Rasterized Image Pixels not aligned with SVG Source
Date Wed, 29 Oct 2003 16:59:11 GMT
I'm having a little trouble with images that were
transcoded with batik.  In particular, I'm working
with svg documents that contain almost all text
elements.  When the doc is transcoded into an image,
coords of the text that appears in the image don't
seem to correspond with the coords specified in the
svg doc. 

I've already taken into account the aspectratio in
testing the coords' congruency.  

Aspectratio = imgwidth/svg:aoiwidth

the aoi that i'm using is the rect element just inside
the page group.

For instance, xcoord:image  = xcoord:svgdoc *
aspectratio

Correct me if I am wrong about the above calcs.  Here
is the svg doc...

Thanks,
Dave

<?xml version="1.0" encoding="ISO-8859-1"?>
<svg contentScriptType="text/ecmascript" width="612.0"
     xmlns:xlink="http://www.w3.org/1999/xlink"
zoomAndPan="magnify"
     contentStyleType="text/css" height="792.0"
     preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
     version="1.0">
    <g id="Page-1"
style="font-family:sanserif;font-size:12"
       transform="translate(0,0.0)">
        <rect width="612.0" x="0.0" height="792.0"
y="0.0"
              style="fill:none;stroke:black"/>
        <text x="144.98" y="83.974976"
style="font-size:14.0;font-weight:bold">
            Championzone
        </text>
        <text x="250.75" y="83.974976"
style="font-size:14.0;font-weight:bold">
            Certificati.n
        </text>
        <text x="333.204" y="83.974976"
style="font-size:14.0;font-weight:bold">
            and
        </text>
        <text x="363.537" y="83.974976"
style="font-size:14.0;font-weight:bold">
            Course
        </text>
        <text x="417.214" y="83.974976"
style="font-size:14.0;font-weight:bold">
            System
        </text>
        <text x="272.543" y="100.92499"
style="font-size:14.0;font-style:italic">
            Use
        </text>
        <text x="302.884" y="100.92499"
style="font-size:14.0;font-style:italic">
            cases
        </text>
        <text x="90.0" y="134.82501"
style="font-size:14.0;font-weight:bold">
            Use
        </text>
        <text x="121.127" y="134.82501"
style="font-size:14.0;font-weight:bold">
            Ca,e
        </text>
        <text x="156.143" y="134.82501"
style="font-size:14.0;font-weight:bold">
            Descr.ption:
        </text>
        <text x="243.259" y="134.82501"
style="font-size:14.0;font-weight:bold">
            Take
        </text>
        <text x="280.613" y="134.82501"
style="font-size:14.0;font-weight:bold">
            Cer,ificat,on
        </text>
        <text x="366.956" y="134.82501"
style="font-size:14.0;font-weight:bold">
            Cour.e
        </text>
        <text x="90.0" y="151.77502"
style="font-size:14.0;font-style:italic">
            Precondition
        </text>
        <text x="167.824" y="151.77502"
style="font-size:14.0">
            :
        </text>
        <text x="177.158" y="151.77502"
style="font-size:14.0">
            The
        </text>
        <text x="206.726" y="151.77502"
style="font-size:14.0">
            person
        </text>
        <text x="254.977" y="151.77502"
style="font-size:14.0">
            plans
        </text>
        <text x="293.89" y="151.77502"
style="font-size:14.0">
            to
        </text>
        <text x="311.01" y="151.77502"
style="font-size:14.0">
            r,.-.ter
        </text>
        <text x="353.783" y="151.77502"
style="font-size:14.0">
            f.r,a
        </text>
        <text x="383.343" y="151.77502"
style="font-size:14.0">
            certification
        </text>
        <text x="459.591" y="151.77502"
style="font-size:14.0">
            course.
        </text>
        <text x="90.0" y="168.72498"
style="font-size:14.0;font-style:italic">
            Main
        </text>
        <text x="125.789" y="168.72498"
style="font-size:14.0;font-style:italic">
            flow
        </text>
        <text x="156.129" y="168.72498"
style="font-size:14.0;font-style:italic">
            of
        </text>
        <text x="173.249" y="168.72498"
style="font-size:14.0;font-style:italic">
            events
        </text>
        <text x="214.496" y="168.72498"
style="font-size:14.0">
            :
        </text>
        <text x="223.83" y="168.72498"
style="font-size:14.0">
            The
        </text>
        <text x="253.398" y="168.72498"
style="font-size:14.0">
            use
        </text>
        <a xlink:href="#svgView(viewBox(0, 0.0, 612,
792))" xlink:type="simple"
           xlink:actuate="onRequest"
xlink:show="replace"
           xmlns:xlink="http://www.w3.org/1999/xlink">
            <rect width="306.0" x="0.0" height="792.0"
y="0.0"
                 
style="fill:blue;visibility:hidden"/>
        </a>
    </g>
</svg>

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message