diff options
Diffstat (limited to 'Swiften/Whiteboard/Elements/WhiteboardFreehandPathElement.h')
-rw-r--r-- | Swiften/Whiteboard/Elements/WhiteboardFreehandPathElement.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Swiften/Whiteboard/Elements/WhiteboardFreehandPathElement.h b/Swiften/Whiteboard/Elements/WhiteboardFreehandPathElement.h new file mode 100644 index 0000000..9b69dc4 --- /dev/null +++ b/Swiften/Whiteboard/Elements/WhiteboardFreehandPathElement.h @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2012 Mateusz Piękos + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <Swiften/Whiteboard/Elements/WhiteboardElement.h> +#include <Swiften/Whiteboard/Elements/Color.h> + +#include <vector> +#include <utility> + +namespace Swift { + class WhiteboardFreehandPathElement : public WhiteboardElement { + typedef std::pair<int, int> Point; + public: + typedef boost::shared_ptr<WhiteboardFreehandPathElement> ref; + public: + WhiteboardFreehandPathElement() { + } + + void setPoints(const std::vector<Point>& points) { + points_ = points; + } + + const std::vector<Point>& getPoints() const { + return points_; + } + + const Color& getColor() const { + return color_; + } + + void setColor(const Color& color) { + color_ = color; + } + + std::string getID() const { + return id_; + } + + void setID(const std::string& id) { + id_ = id; + } + + int getPenWidth() const { + return penWidth_; + } + + void setPenWidth(const int penWidth) { + penWidth_ = penWidth; + } + + void accept(WhiteboardElementVisitor& visitor) { + visitor.visit(*this); + } + + private: + + std::vector<Point> points_; + Color color_; + int penWidth_; + std::string id_; + }; +} |