/** * 0 = normal * 1 = 90 degrees * 2 = 180 degrees * 3 = 270 degrees * @param int $degree * @param $asianFont * @throw ExceptionCommand * @return int */ private function rotationConvertFromDegree($degree, $asianFont) { switch ($degree) { case 90: if ($asianFont) { return 5; } return 1; case 180: if ($asianFont) { return 6; } return 2; case 270: if ($asianFont) { return 7; } return 3; case 0: if ($asianFont) { return 4; } return 0; default: throw ExceptionCommand::invalidDegree($degree); } }
/** * 0 = normal * 1 = 90 degrees * 2 = 180 degrees * 3 = 270 degrees * @param int $degree * @return int */ protected function rotationConvertFromDegree($degree) { switch ($degree) { case 90: return 1; case 180: return 2; case 270: return 3; case 0: return 0; default: throw ExceptionCommand::invalidDegree($degree); } }