class PDF::Reader::Rectangle
def apply_rotation(degrees)
def apply_rotation(degrees) return if degrees != 90 && degrees != 180 && degrees != 270 if degrees == 90 new_x1 = bottom_left.x new_y1 = bottom_left.y - width new_x2 = bottom_left.x + height new_y2 = bottom_left.y elsif degrees == 180 new_x1 = bottom_left.x - width new_y1 = bottom_left.y - height new_x2 = bottom_left.x new_y2 = bottom_left.y elsif degrees == 270 new_x1 = bottom_left.x - height new_y1 = bottom_left.y new_x2 = bottom_left.x new_y2 = bottom_left.y + width end set_corners(new_x1 || 0, new_y1 || 0, new_x2 || 0, new_y2 || 0) end