Hi all, i am playing with custom shapes again. I am mostly success with this. I have only one problem with subshapes, see below. First, while reading the manual (http://dia-installer.de/doc/en/custom-shapes-chapter.html), i found two small problems: 1, in the 11.2. Shapes chapter in the connection points description is not mentioned the man="yes" attribute description. 2, in 11.3.1. Style attribute chapter is not clean (for me), what happens when i set some style property (eg. stroke or fill) with setting this property via Properties dialog – it seems, that the dialog's value are ignored int this case. Now my subshape problem. I am preparing the shapes for drawing block diagrams, where i need something as bus, ie. something ruder than line. I prepared shapes with 1x1 cm default sice, which have borders and background without problems. Then i want to create some corner and cross shapes, to i can simple create connections, etc. But, when i resized this cross, i see, that by resizing the shape, the distance between borders are growing equally with resizing, but i want to fixed distance from shape edges. It was no problem to create subshape borders for this and problem was solved. But my problem is about background (the cross filling). I am not able to create entry, which will be properly resized between the fixed positioned borders. It is possible, please? What i am doing wrong? I attach example (drawn by hand) image, one is original size cross and second is resized, where is possible to see, that background is growing in bad manner and don't fill the place between borders. Here is my "cross" shape (it is unfinished – one background rectangle is not subshaped yet): <?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>cross</name> <icon>cross.png</icon> <connections> <point x="5" y="5" main="yes" /> </connections> <aspectratio type="range" min="1" max="3" /> <default-width>3</default-width> <default-height>3</default-height> <svg:svg> <svg:rect style="stroke: none;fill: none" x="0" y="0" width="30" height="30" /> <svg:rect style="stroke: none;fill: default" x="0" y="10" width="30" height="10" /> <svg:g subshape="true" v_anchor="fixed.top" h_anchor="proportional" > <svg:rect style="stroke: none;fill: default" x="10" y="0" width="10" height="30" /> </svg:g> <svg:g subshape="true" v_anchor="fixed.top" h_anchor="fixed.left" > <svg:path style="stroke: inverse" d="M 0,10 H 10 V 0" /> </svg:g> <svg:g subshape="true" v_anchor="fixed.top" h_anchor="fixed.right" > <svg:path style="stroke: inverse" d="M 20,0 V 10 H 30" /> </svg:g> <svg:g subshape="true" v_anchor="fixed.bottom" h_anchor="fixed.left" > <svg:path style="stroke: inverse" d="M 0,20 H 10 V 30" /> </svg:g> <svg:g subshape="true" v_anchor="fixed.bottom" h_anchor="fixed.right" > <svg:path style="stroke: inverse" d="M 20,30 V 20 H 30" /> </svg:g> </svg:svg> </shape> thanks -- Slavko http://slavino.sk
Attachment:
cross_shape.png
Description: PNG image
Attachment:
signature.asc
Description: OpenPGP digital signature