33 , radiusA_(std::max(std::abs(radiusA), std::abs(radiusB)))
34 , radiusB_(std::min(std::abs(radiusA), std::abs(radiusB)))
82 if (radiusA <= radiusB_)
84 radiusA_ = std::abs(radiusA);
104 if (radiusB < 0.0 || radiusB > radiusA_)
106 radiusB_ = std::abs(radiusB);
126 rotation_ = rotation;
138 return (center_ == ellipse.center_
139 && radiusA_ == ellipse.radiusA_
140 && radiusB_ == ellipse.radiusB_
141 && rotation_ == ellipse.rotation_);
153 return !(*
this == ellipse);
Object for convenient and type - safe handling of angles.
Definition: angle.hpp:19
void SetIsTrimmed(bool trim) noexcept
Set trimming of the value of the angle to the range -PI...PI.
Definition: angle.hpp:119
Class representing an ellipse.
Definition: ellipse.hpp:20
void SetRadiusB(double radiusB)
Sets the smaller radius of the ellipse.
Definition: ellipse.hpp:102
Point2D< double > Center() const noexcept
Gets the center of the ellipse.
Definition: ellipse.hpp:50
void SetRotation(Angle rotation) noexcept
Sets the angle by which the ellipse is rotated.
Definition: ellipse.hpp:124
bool operator==(const Ellipse &ellipse) const noexcept
Compares to an other ellipse.
Definition: ellipse.hpp:136
void SetRadiusA(double radiusA)
Sets the larger radius A of the ellipse.
Definition: ellipse.hpp:80
double RadiusB() const noexcept
Gets the larger radius of the ellipse.
Definition: ellipse.hpp:92
Angle Rotation() const noexcept
Gets the angle by which the ellipse is rotated.
Definition: ellipse.hpp:114
void SetCenter(Point2D< double > center) noexcept
Sets the center of the ellipse.
Definition: ellipse.hpp:60
double RadiusA() const noexcept
Gets the larger radius of the ellipse.
Definition: ellipse.hpp:70
bool operator!=(const Ellipse &ellipse) const noexcept
Compares to an other ellipse.
Definition: ellipse.hpp:151
Ellipse(Point2D< double > center, double radiusA, double radiusB, Angle rotation)
Create an ellipse.
Definition: ellipse.hpp:31
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24