* Applies left clipping to a line. * @param x1 Pointer to the X-coordinate of the begin of the line. * @param y1 Pointer to the Y-coordinate of the begin of the line. * @param x2 The X-coordinate of the end of the line. * @param y2 The Y-coordinate of the end of the line. */
| 2454 | * @param y2 The Y-coordinate of the end of the line. |
| 2455 | */ |
| 2456 | static void ClipLeft(int16 *x1, int16 *y1, int16 x2, int16 y2) |
| 2457 | { |
| 2458 | *y1 += (y2 - *y1) * (g_clipping.left - *x1) / (x2 - *x1); |
| 2459 | *x1 = g_clipping.left; |
| 2460 | } |
| 2461 | |
| 2462 | /** |
| 2463 | * Applies right clipping to a line. |