(Mon, 17 Jan 2000) Luc Chouinard wrote:
> Jens-Uwe Morawski wrote:
> 
> > I don't know when dia will support arcs; but i think it should
> > be possible to redraw the cloud based on arcs with bezier splines
> > ; then export to svg and edit it manually to build a shape.
> >
> > If you like, you can send me the dia file  (only including the
> > cloud, please); i want to try it.
> >
> > Jens
> 
> Here is an example of a cloud using bezier splines, it needs some works but could be 
>a
> start.
> 
> 
> Luc
> 
> ----------------8<------------------8<------------------8<-----------------
[ dia file deleted ]

put this as <ANYTHING>.shape in ~/.dia/shapes
>---begin nwcloud.shape--------
<?xml version="1.0"?>
<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns"
       xmlns:svg="http://www.w3.org/Graphics/SVG/svg-19990730.dtd">
  <name>NetworkExtra-Cloud</name>
  <connections>
    <point x="5.8" y="0.38"/>
    <point x="0.8" y="3.86"/>
    <point x="11.16" y="3.98"/>
    <point x="6.4" y="8.3"/>
  </connections>
  <aspectratio type="fixed"/>
  <svg:svg width="20" height="30">
       <svg:path d="M 5 7 
                    C 5.5405,8.9891 7.66705,8.57246 8.01295,6.7347"/>
       <svg:path d="M 7.54925 1.3273
                    C 8.84655,0.4409 11.1377,-0.135584 9.38645,3.43182"/>
       <svg:path d="M 9.77565 2.54542 
                    C 10.4385,2.32922 12.4708,3.86425 9.85475,6.02632"/>
       <svg:path d="M 4.44965 1.84022
                    C 2.46045,-0.127284 8.23325,0.0240165 7.54135,1.35622"/>
       <svg:path d="M 4.08599 1.32371
                    C 2.39949,0.307512 1.48355,2.09962 1.85105,2.55362"/>
       <svg:path d="M 2.67265 2.32402
                    C 0.207847,2.75652 0.467347,4.52938 1.76455,5.30773"/>
       <svg:path d="M 2.62795 4.20507
                    C -0.182753,6.17256 4.59589,8.78319 5.00669,7.03191"/>
       <svg:path d="M 7.86025 7.23197
                    C 9.39535,8.98325 11.5059,5.78463 10.2519,5.69815"/>
  </svg:svg>
</shape>
<---end nwcloud.shape--------

If you prefer more flexible scaling (not keeping the aspect ratio)
then remove the line starting with <aspectratio ...>


and this to <ANYTHING>.sheet in ~/.dia/sheets
>---begin NetExtra.sheet--------
<?xml version="1.0"?> <!-- -*- xml -*- -->
<sheet xmlns="http://www.lysator.liu.se/~alla/dia/dia-sheet-ns">
  <name>NetExtra</name>
  <description>Extras for the Network Sheet</description>
  <contents>
    <shape name="NetworkExtra-Cloud">
      <description>Network Cloud</description>
    </shape>
 </contents>
</sheet>
>---end NetExtra.sheet--------

Then Dia should find the shape automatically.

Sorry, i don't know how do make the shape fillable, maybe anybody
else knows. Please tell me.
I know the style-fill-default stuff; but because of the "M" svg:path
command the path isn't closed and only closed paths can be filled.

Jens

Reply via email to