MASK_XY_FLIP
if (orient & MASK_XY_FLIP)
orient = MASK_XY_FLIP | MASK_X_INVERT;
orient = MASK_XY_FLIP | MASK_Y_INVERT;