public static int clipping_flags_x(int x, RectangleI clip_box) { return ((x > clip_box.x2 ? 1 : 0) | ((x < clip_box.x1 ? 1 : 0) << 2)); }