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

cameo: documented X/Y translation commands, some small improvements

- README: described the X/Y translation commands
- lang.y: print an error if the lower bound if larger than the upper bount
  in an "align" command
- lang.y: mention that "array" doesn't work as expected if in imperial mode
This commit is contained in:
Werner Almesberger
2010-12-14 19:17:34 -03:00
parent ddcf5191db
commit f36f7048e6
2 changed files with 40 additions and 1 deletions

View File

@@ -139,6 +139,11 @@ command:
int ref = $2;
double x, y;
if ($3 > $5)
yyerror("left edge > right edge");
if ($4 > $6)
yyerror("bottom > top");
ref_pick_xy(ref, $3, $4, $5, $6, &x, &y);
align(ref, x, y);
}
@@ -147,6 +152,7 @@ command:
double x = $2*$4;
double y = $3*$5;
/* @@@ known bug: doesn't work if not in metric mode */
translate(x, y, 0);
}
| TOK_CLEAR