Re: How to create own shapes with connections?
- From: zweiund40 <thoswald42 gmail com>
- To: discussions about usage and development of dia <dia-list gnome org>
- Subject: Re: How to create own shapes with connections?
- Date: Thu, 6 Apr 2017 16:30:39 +0200
Thank you for answering my request.
Editing the xml-file is exactly what's driving me crazy. I tried it
several times in different ways.
I created a cloudlike image with inkspace, saved it as an svg, opened it
with dia and exported it as .shape-file. It was the only way that worked
for me. And now I'm stucking exactly at this point: trying to add
connections by editing the xml-file. But everytime I do it, then
importing it in dia by pressing key F9 ... , dia sets all the values
back to the former version. My xml looks is this:
bebektor:~/.dia/shapes$ cat cloudlet.shape
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns"
xmlns:svg="http://www.w3.org/2000/svg">
<name>ossi - cloudlet</name>
<icon>cloudlet.png</icon>
<connections/>
<aspectratio type="fixed"/>
<svg:svg>
<svg:path style="fill: #ffffff" d="M 0 0 L 0.25,-0.25 L -0.625,0 L
0.25,0.25 L 0,0z"/>
<svg:path style="fill: none; fill-opacity:0; stroke-width: 0.05;
stroke: #000000" d="M 0 0 L 0.25,-0.25 L -0.625,0 L 0.25,0.25 L 0,0"/>
<svg:path style="fill: #ffffff" d="M 3.33402 0.0536043 C
1.46323,0.0535795 -0.0533718,1.28468 -0.0534343,2.80336 C
-0.0534753,4.32209 1.46316,5.55328 3.33402,5.55326 C 4.10738,5.55289
4.85731,5.33771 5.45918,4.94347 C 6.06034,5.33724 6.80923,5.5524
7.58168,5.55326 C 8.4622,5.55324 9.3081,5.27489 9.94012,4.7772 C
10.5709,5.27388 11.4147,5.55215 12.2934,5.55326 C 13.0694,5.55283
13.8218,5.33608 14.4246,4.93928 C 15.0269,5.33576 15.7785,5.55249
16.5539,5.55326 C 17.4221,5.55277 18.2568,5.28173 18.8859,4.79609 C
19.5141,5.28108 20.3475,5.55207 21.2145,5.55326 C 23.0853,5.55322
24.6018,4.32205 24.6018,2.80336 C 24.6017,1.28472 23.0852,0.0536433
21.2145,0.0536043 C 20.3463,0.0540677 19.5115,0.325108 18.8824,0.810773
C 18.2542,0.325811 17.4208,0.0548251 16.5539,0.0536043 C
15.7779,0.0540377 15.0255,0.270781 14.4227,0.667579 C 13.8204,0.271101
13.0688,0.0543769 12.2934,0.0536043 C 11.4129,0.0536232 10.567,0.331972
9.93493,0.829659 C 9.3042,0.332986 8.4604,0.0547172 7.58168,0.0536043 C
6.80831,0.0539795 6.05838,0.269171 5.45652,0.663419 C 4.85536,0.269636
4.10647,0.0544727 3.33402,0.0536043z"/>
<svg:path style="fill: none; fill-opacity:0; stroke-width:
0.0925197; stroke-dasharray: 0.001; stroke: #000000" d="M 3.33402
0.0536043 C 1.46323,0.0535795 -0.0533718,1.28468 -0.0534343,2.80336 C
-0.0534753,4.32209 1.46316,5.55328 3.33402,5.55326 C 4.10738,5.55289
4.85731,5.33771 5.45918,4.94347 C 6.06034,5.33724 6.80923,5.5524
7.58168,5.55326 C 8.4622,5.55324 9.3081,5.27489 9.94012,4.7772 C
10.5709,5.27388 11.4147,5.55215 12.2934,5.55326 C 13.0694,5.55283
13.8218,5.33608 14.4246,4.93928 C 15.0269,5.33576 15.7785,5.55249
16.5539,5.55326 C 17.4221,5.55277 18.2568,5.28173 18.8859,4.79609 C
19.5141,5.28108 20.3475,5.55207 21.2145,5.55326 C 23.0853,5.55322
24.6018,4.32205 24.6018,2.80336 C 24.6017,1.28472 23.0852,0.0536433
21.2145,0.0536043 C 20.3463,0.0540677 19.5115,0.325108 18.8824,0.810773
C 18.2542,0.325811 17.4208,0.0548251 16.5539,0.0536043 C
15.7779,0.0540377 15.0255,0.270781 14.4227,0.667579 C 13.8204,0.271101
13.0688,0.0543769 12.2934,0.0536043 C 11.4129,0.0536232 10.567,0.331972
9.93493,0.829659 C 9.3042,0.332986 8.4604,0.0547172 7.58168,0.0536043 C
6.80831,0.0539795 6.05838,0.269171 5.45652,0.663419 C 4.85536,0.269636
4.10647,0.0544727 3.33402,0.0536043"/>
</svg:svg>
</shape>
It's driving me mad. I think I'm shortly before kicking my f*** laptop
out of the window!
Do you have any idea what's going wrong?
On 06.04.2017 15:51, Бамсик Потапов wrote:
Hello, you must use this code
<connections>
<point x="0.0" y="0.4"/>
<point x="1.4" y="0.4"/>
</connections>
for example my own shape with connection:
<?xml version="1.0"?>
<shape xmlns="http://www.daa.com.au/~james/dia-shape-ns"
xmlns:svg="http://www.w3.org/2000/svg">
<name>Elemento-01.01.01.001.1</name>
<description>Контакт нормально-разомкнутый ГОСТ 2.755-87</description>
<icon>Elemento-01.01.01.001.1.png</icon>
<connections>
<point x="0.0" y="0.4"/>
<point x="1.4" y="0.4"/>
</connections>
<aspectratio type="fixed"/>
<default-width>1.4cm</default-width>
<default-height>0.4cm</default-height>
<textbox x1="0.0" y1="-1.3" x2="1.4" y2="-0.3" resize="no"/>
<svg:svg>
<svg:g style="stroke-linecap:round">
<svg:line x1="0.0" y1="0.4" x2="0.4" y2="0.4"/>
<svg:line x1="0.4" y1="0.4" x2="1.0" y2="0.0"/>
<svg:line x1="1.0" y1="0.4" x2="1.4" y2="0.4"/>
<svg:rect x="0.0" y="0.0" width="1.4" height="0.4"
style="stroke:none; fill:none"/>
</svg:g>
</svg:svg>
</shape>
06.04.2017 16:47, zweiund40 пишет:
Hi. I'm trying to create a new shape with connection points and it's
driving me crazy. It doesn't work. But on the other hand there are
many other shapes per default in dia and all of them are provided
with connection points. I wonder why all my efforts fail. There must
be a way to do it. But how? Is there anyone who knows how it works?
Best wishes
_______________________________________________
dia-list mailing list
dia-list gnome org
https://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia
_______________________________________________
dia-list mailing list
dia-list gnome org
https://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]