RE: Use & sign within shape



Apolgize i cannot quote you...

Obviously ampersand sign is written 
& in any xml

Ampersand and less-than are absolutely reserved internally
Note its a good idea to also not use
More-than to valid xml,
I will also discourage  quote 

So use   
< & > "
To type them. 
While you will never use simpl quotes to
Delimit attributes....
-- 
Thomas Harding tom thomas-harding name
1 rue Raymond Vannier
45000 OrlÃans, France
"l'info libre est responsable"

-- msg original --
Sujet: Use & sign within shape
De: Boris Mayer-St-Onge <boris gmc ulaval ca>
Date: 2010.04.12 20:04

Hello,

I would like to create a new shape that need to have the sign & written 
on it (similar to the electrical "and gate"). Unfortunately, I'm unable 
to add it. Following is a basic example of a shape that works:

<?xml version="1.0"?>

<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns";
       xmlns:svg="http://www.w3.org/2000/svg";>
  <name>Shape - Simple test</name>
  <icon>simple.png</icon>
  <connections>
    <point x="0" y="0.5"/>
    <point x="0" y="1.5"/>
    <point x="4" y="1"/>
  </connections>
  <aspectratio type="fixed"/>
  <svg:svg width="4" height="2">
    <svg:line x1="0" y1="0.5" x2="1" y2="0.5"/>
    <svg:line x1="0" y1="1.5" x2="1" y2="1.5"/>
    <svg:line x1="3" y1="1" x2="4" y2="1"/>
    <svg:rect x="1" y="0" width="2" height="2"/>
    <svg:text style="font-size: 0.6" x="0.5" y="0.4" 
textLength="0.29">1</svg:text>
    <svg:text style="fill: font-size: 0.6" x="0.5" y="1.4" 
textLength="0.29">2</svg:text>
    <svg:text style="font-size: 0.6" x="3.25" y="0.9" 
textLength="0.29">3</svg:text>
  </svg:svg>
</shape>

If I'm adding the following line, nothing appear when I add the shape to 
my dia diagram:

<svg:text style="font-size: 1.5" x="1.65" y="1.5" 
textLength="0.29">&</svg:text>

I have also try this without success:

<svg:text style="fill: #000000; font-size: 0.6; text-anchor:start; 
font-family: monospace; font-style: normal; font-weight: normal" 
x="1.65" y="1.5" textLength="0.29">&</svg:text>

Is it possible draw the & sign within a shape? I'm using Dia 0.97 on Fedora.

Thanks.

Boris Mayer-St-Onge

_______________________________________________
dia-list mailing list
dia-list gnome org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]