Esempio n. 1
0
bool Circle::operator==(const Circle& circle) const {
    if (this->getX() == circle.getX() && this->getY() == circle.getY() &&
        this->getRadius() == circle.getRadius() &&
        this->isVisible() == circle.isVisible() &&
        this->getRed() == circle.getRed() &&
        this->getGreen() == circle.getGreen() &&
        this->getBlue() == circle.getBlue())
        return true;
    else return false;    
}
Esempio n. 2
0
Circle::Circle(const Circle& circle) : Shape() {
    this->setLocation(circle.getX(), circle.getY());
    this->setRadius(circle.getRadius());
    this->setVisible(circle.isVisible());
    this->setColor(circle.getRed(), circle.getGreen(), circle.getBlue());
}