Rotating images | * Rotating videos * * * @api */ class Rotate extends BaseAction implements RotationDegreeInterface, RotationModeInterface { use AngleTrait; use RotationModeTrait; /** * Rotate constructor. * * @param mixed $degree The degrees of the angle. */ public function __construct(...$degree) { parent::__construct(ClassUtils::verifyVarArgsInstance($degree, Angle::class)); } /** * Sets the rotation angle. * * @param mixed $degree The degrees of the angle. */ public function setAngle(...$degree) { $this->addQualifier(Degree::byAngle(...$degree)); } /** * Named constructor. * * @param mixed $degree The degree of the angle. * * @return Rotate */ public static function createWithDegree(...$degree) { return new self(Angle::byAngle(...$degree)); } /** * Named constructor. * * @param mixed $mode The rotation mode. * * @return Rotate */ public static function createWithMode(...$mode) { return new self(Angle::mode(...$mode)); } }