/* * NICE-Core - efficient algebra and computer vision methods * - libimage - An image/template for new NICE libraries * See file License for license information. */ #include "core/image/CircleT.h" #include "core/image/EllipseT.h" namespace NICE { // Constructors: // ------------- template CircleT

::CircleT(const Coord ¢er, const int radius) { this->center=center; this->radius=radius; } template CircleT

::CircleT(const Coord ¢er, const int radius, const ColorT

& _defaultColor) : Drawable

(_defaultColor) { this->center=center; this->radius=radius; } template CircleT

::CircleT() { } template CircleT

::CircleT(const CircleT

& ex) : Drawable

(ex) { *this=ex; } // Operators: // ---------- template CircleT

& CircleT

::operator=(const CircleT

& ex) { center=ex.center; radius=ex.radius; this->defaultColor=ex.defaultColor; return *this; } template bool CircleT

::operator==(const CircleT

& ex) const { if(center==ex.center && radius==ex.radius&& this->defaultColor==ex.defaultColor) return true; return false; } template bool CircleT

::operator!=(const CircleT

& ex) const { return !(this->operator==(ex)); } // Methods: // -------- template void CircleT

::doDraw(ColorImageT

&image, const ColorT

& color) const { Coord axis(radius,radius); EllipseT

e(center,axis,0); e.draw(image, color); } template void CircleT

::doDraw(ImageT

&image, const P& gray) const { Coord axis(radius,radius); EllipseT

e(center,axis,0); e.draw(image, gray); } // Destructor: // ----------- template CircleT

::~CircleT() { } }; // namespace NICE