tsp_cpp/xmlParser/Circle.h

39 lines
825 B
C++

//
// Created by trotfunky on 07/05/19.
//
#ifndef SNIPPETS_CIRCLE_H
#define SNIPPETS_CIRCLE_H
#include <string>
#include <pugixml.hpp>
#include <SFML/Graphics.hpp>
#include <sstream>
#include "DrawingElement.h"
namespace xmlParser
{
class Circle : public DrawingElement
{
public:
explicit Circle(std::string label = "Test Circle", float x = 0, float y = 1, float r = 2,
const sf::Color& color = sf::Color::Yellow);
explicit Circle(const pugi::xml_node&);
void draw(sf::RenderWindow&) override;
void setX(float newX) override;
void setY(float newY) override;
float getR() const;
void setR(float newR);
const std::string toString(int indent) const override;
private:
float r;
};
}
#endif //SNIPPETS_CIRCLE_H