dia_bezier(point * A, int n, int arrow_at_start, int arrow_at_end, int filled)
{
int i, conn_h, conn_t;
- pointf p, firstp = { 0, 0 }, llp = {
- 0, 0}, urp = {
- 0, 0};
+ pointf p, firstp = { 0, 0 }, llp = { 0, 0}, urp = { 0, 0};
node_t *head, *tail;
char *shape_t;
pointf cp_h, cp_t;
dia_fputs(" </dia:attribute>\n");
dia_fputs(" <dia:connections>\n");
+/* FIXME !!! - What is this crap! It should just user the arrow vector. */
if ((strcmp(shape_t, "ellipse") == 0)
|| (strcmp(shape_t, "circle") == 0)
|| (strcmp(shape_t, "doublecircle") == 0)) {
conn_h = ellipse_connection(cp_h, diapt(A[n - 1]));
else
conn_h = ellipse_connection(cp_h, diapt(A[0]));
+ } else if (strcmp(shape_t, "record") == 0) {
} else {
if (AG_IS_DIRECTED(Rootgraph))
conn_h = box_connection(head, diapt(A[n - 1]));
conn_t = ellipse_connection(cp_t, diapt(A[0]));
else
conn_t = ellipse_connection(cp_t, diapt(A[n - 1]));
+ } else if (strcmp(shape_t, "record") == 0) {
} else {
if (AG_IS_DIRECTED(Rootgraph))
conn_t = box_connection(tail, diapt(A[0]));
return rv;
}
-static point size_reclbl(node_t * n, field_t * f)
+static pointf size_reclbl(node_t * n, field_t * f)
{
int i;
char *p;
double marginx, marginy;
- point d, d0;
+ pointf d, d0;
pointf dimen;
if (f->lp) {
} else
PAD(dimen);
}
- PF2P(dimen, d);
+ d = dimen;
} else {
d.x = d.y = 0;
for (i = 0; i < f->n_flds; i++) {
return d;
}
-static void resize_reclbl(field_t * f, point sz, int nojustify_p)
+static void resize_reclbl(field_t * f, pointf sz, int nojustify_p)
{
int i, amt;
double inc;
pointf d;
- point newsz;
+ pointf newsz;
field_t *sf;
/* adjust field */
sf = f->fld[i];
amt = ((int) ((i + 1) * inc)) - ((int) (i * inc));
if (f->LR)
- newsz = pointof(sf->size.x + amt, sz.y);
+ newsz = pointfof(sf->size.x + amt, sz.y);
else
- newsz = pointof(sz.x, sf->size.y + amt);
+ newsz = pointfof(sz.x, sf->size.y + amt);
resize_reclbl(sf, newsz, nojustify_p);
}
}
* the sides attribute, which indicates which sides of the
* record are accessible to the field.
*/
-static void pos_reclbl(field_t * f, point ul, int sides)
+static void pos_reclbl(field_t * f, pointf ul, int sides)
{
int i, last, mask;
static void record_init(node_t * n)
{
field_t *info;
- point ul, sz;
+ pointf ul, sz;
int flip, len;
char *textbuf; /* temp buffer for storing labels */
int sides = BOTTOM | RIGHT | TOP | LEFT;
sz.y = MAX(info->size.y, sz.y);
}
resize_reclbl(info, sz, mapbool(late_string(n, N_nojustify, "false")));
- ul = pointof(-sz.x / 2, sz.y / 2); /* suspected to introduce ronding error - see Kluge below */
+ ul = pointfof(-sz.x / 2., sz.y / 2.); /* FIXME - is this still true: suspected to introduce ronding error - see Kluge below */
pos_reclbl(info, ul, sides);
ND_width(n) = PS2INCH(info->size.x);
ND_height(n) = PS2INCH(info->size.y + 1); /* Kluge!! +1 to fix rounding diff between layout and rendering