It would be very nice if there were a way to control which point of an
object snapped to the grid and the default size of an object when it is
placed in the drawing. For example, consider this object:

<?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>BusHighOutputLeft</name>
   <description>Asserted high output bus to the left</description>
   <icon>BusHighOutputLeft.xpm</icon>
   <connections>
     <point x="0" y="0" />
     <point x="0" y="2" />
   </connections>
   <svg:svg>
     <svg:polyline points="0,0 -1,0 -1,-1 -3,1 -1,3 -1,2 0,2" />
   </svg:svg>
</shape>

kind of a wide hollow arrow. Dia creates a box around the object and the
top left corner of that box is what is snapped to the grid. When you place
this object in a drawing, the connection points are off-grid because of
this; in order to get the connection points on grid, I have to either turn
snap-to-grid off or make the object bigger.

What I'd really like is to specify that the 0,0 point in the XML description
be snapped to the grid instead of the top left corner of the box that surrounds
the object.

I've been playing with creating bogus points to control the top left corner
of the bounding box, like this:

      <svg:line x1="-4" y1="-4" x2="-4" y2="-4" />

but haven't yet come up with something satisfactory; this sort of stuff
usually causes dia to draw the object smaller. It would be nice if I had
some control over the default scaling so that I could somehow make it
so that both the 0,0 and 0,2 connection points are on grid when you first
drag the object onto the drawing (as a workaround, I've been scaling the
objects and then cutting and pasting copies of it at the appropriate
scaling).


-- 
Roger Ivie
TeraGlobal Communications Corporation
1770 North Research Park Way
North Logan, UT 84341
Phone: (435)787-0555
Fax: (435)787-0516

Reply via email to