angle | real (0.0...359.9) |
layer | int |
x1, y1 | int (lower left corner) |
x2, y2 | int (upper right corner) |
See also UL_BOARD, UL_FOOTPRINT, UL_SHEET, UL_SYMBOL
The coordinates (x1 y1) and (x2 y2) are always referring to the initial orientation of the rectangle regardless of the angle.
angle defines how many degrees the rectangle is rotated counterclockwise around its center. The center coordinates are given by (x1+x2)/2 and (y1+y2)/2.
board(B) {
B.rectangles(R) {
printf("Rectangle: (%f %f), (%f %f)\n",
u2mm(R.x1), u2mm(R.y1), u2mm(R.x2), u2mm(R.y2));
}
}