Re: SVG box sizes appear bigger than size defines with mouse

Thank you for the information, Vincent.
Juan Lanus

Vincent Quint <Vincent.Quint@inrialpes.fr> wrote:

>Juan Lanus wrote:
>
>> Also, in the meanwhile and if it's not too, it would be fine that <rect> 
>> and the other shapes were not created as <empty /> tags.
>
>But that would not be valid SVG. <rect> and other basic shapes are empty
>elements by definition. You can't put other graphic elements, even text,
>within a <rect>. The only thing you can put is an animation element
>(to animate the rectangle) or some description (desc, title, metadata),
>to document your source code. But those elements are not visible.
>Refer to the definition of rect in the SVG 1.0 specification:
>
>   http://www.w3.org/TR/SVG/shapes.html#RectElement
>
>If you want to group a rectangle with some text element, use <g>, as
>indicated in:
>
>   http://www.w3.org/TR/SVG/struct.html#Groups
>
>> This would take about 50% of the editing effort needed to move text into 
>> rectangles.
>
>But that would lead to invalid documents. I guess that what you
>would like to do is something like:
>
>  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
>       "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
>  <svg xmlns="http://www.w3.org/2000/svg" version="1.0">
>    <g transform="translate(60,20)">
>      <rect fill="yellow" width="120px" height="70px" y="0" x="0"/>
>      <text y="40px" x="35px"> Some text </text>
>    </g>
>  </svg>
>
>The Amaya team will have to work more on SVG editing, but at the moment
>you can almost produce something like that with Amaya. Using the Graphics
>palette, create a rectangle and a text string, then select both elements
>(I guess there is a bug in the current version, as the second selected
>element is not highlighted) and press the Group button in the Graphics
>palette. You can then apply a transform attribute to the <g>.
>
>Vincent.
>
>> JL
>> 
>> Juan Lanus wrote:
>> 
>> > Irene Vatton wrote:
>> > 
>> >>I fixed a similar crash. Could you send me a scenario that shows the bug, 
>> >>so I can test it's effectively fixed.
>> >>  
>> >>
>> > <?xml version="1.0" encoding="iso-8859-1"?>
>> > <html xmlns="http://www.w3.org/1999/xhtml">
>> > <head>
>> >   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
>> >   <title>No title</title>
>> > </head>
>> > 
>> > <body>
>> > <svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="759px"
>> >      height="271px">
>> >   <rect stroke="black" fill="none" y="42px" x="50px" width="395px"
>> >         height="112px">
>> >     <switch>
>> >       <foreignObject requiredExtensions="http://www.w3.org/1999/xhtml"
>> >                      width="183px" height="61px" y="71px" x="114px">
>> > 
>> >         <div xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
>> >         <p>erertertergd dfgdfg t fgfdgfgdrt drg rtg fgj yfj fghfg fgh
>> >         fghfg</p>
>> >         </div>
>> >       </foreignObject>
>> >       <text y="71px" x="114px"><html>
>> >       </text>
>> >     </switch>
>> >   </rect>
>> > </svg>
>> > </body>
>> > </html>
>> > 
>> > In a new XHTML 1.1 doc in Win2K Pro I did:
>> > 
>> >    1. add a rectangle
>> >    2. add a text box
>> >    3. write some text into the text box
>> >    4. view source
>> >    5. make the <rect> non-empty
>> >    6. move the <switch> into the <rect> just brfore </rect> with cut and
>> >       paste (seleted lines by dragging over the line numbers)
>> >    7. synchronized from source to normal view
>> >    8. crash!
>> > 
>> > Juan Lanus
>> > TECNOSOL
>> > Argentina
>> > 
>> > 
>> 
>> 
>
>
>


-- 
Juan Lanus
TECNOSOL
Argentina


__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

Received on Tuesday, 16 September 2003 13:11:58 UTC