| 1219 | } |
| 1220 | |
| 1221 | static void |
| 1222 | canonical_rect(Rect *r, short x1, short y1, short x2, short y2) |
| 1223 | { |
| 1224 | if (x1 < x2) { |
| 1225 | if (y1 < y2) { |
| 1226 | SetRect(r, x1, x2, y1, y2); |
| 1227 | } else { |
| 1228 | SetRect(r, x1, x2, y2, y1); |
| 1229 | } |
| 1230 | } else { |
| 1231 | if (y1 < y2) { |
| 1232 | SetRect(r, x2, x1, y1, y2); |
| 1233 | } else { |
| 1234 | SetRect(r, x2, x1, y2, y1); |
| 1235 | } |
| 1236 | } |
| 1237 | } |
| 1238 | |
| 1239 | /* |
| 1240 | * Line drawing - very device dependent |