1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2025-04-21 12:27:27 +03:00

More work on measurements. Getting there ...

- removed support for old-style measurements
- new-style measurements are now embedded in "struct obj", so we can dump and 
  delete them
- "measxy" is now called "meas"
- updated examples to use new-style measurements



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5412 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner
2009-08-09 00:06:54 +00:00
parent 851c82af6f
commit 4a0fd61016
19 changed files with 107 additions and 105 deletions

10
inst.c
View File

@@ -677,10 +677,8 @@ static int meas_op_anchors(struct inst *inst, struct vec ***anchors)
{
struct obj *obj = inst->obj;
if (!inst->obj)
return 0; /* @@@ new-style measurements */
anchors[0] = &obj->base;
anchors[1] = &obj->u.meas.other;
anchors[1] = &obj->u.meas.high;
return 2;
}
@@ -695,7 +693,7 @@ static struct inst_ops meas_ops = {
};
int inst_meas(struct obj *obj, struct meas *meas,
int inst_meas(struct obj *obj,
struct coord from, struct coord to, unit_type offset)
{
struct inst *inst;
@@ -704,9 +702,7 @@ int inst_meas(struct obj *obj, struct meas *meas,
inst->obj = obj;
inst->u.meas.end = to;
inst->u.meas.offset = offset;
inst->u.meas.meas = meas;
if (!obj)
inst->active = 1; /* @@@ new-style measurements */
inst->active = 1; /* measurements are always active */
/* @@@ our bbox is actually a bit more complex than this */
update_bbox(&inst->bbox, to);
propagate_bbox(inst);