00001 /* 00002 * Copyright (c) 2012 Mateusz Piękos 00003 * Licensed under the simplified BSD license. 00004 * See Documentation/Licenses/BSD-simplified.txt for more information. 00005 */ 00006 00007 #pragma once 00008 00009 #include <Swiften/Elements/Whiteboard/WhiteboardElement.h> 00010 #include <Swiften/Elements/Whiteboard/WhiteboardColor.h> 00011 00012 #include <vector> 00013 #include <utility> 00014 00015 namespace Swift { 00016 class WhiteboardFreehandPathElement : public WhiteboardElement { 00017 typedef std::pair<int, int> Point; 00018 public: 00019 typedef boost::shared_ptr<WhiteboardFreehandPathElement> ref; 00020 public: 00021 WhiteboardFreehandPathElement() { 00022 } 00023 00024 void setPoints(const std::vector<Point>& points) { 00025 points_ = points; 00026 } 00027 00028 const std::vector<Point>& getPoints() const { 00029 return points_; 00030 } 00031 00032 const WhiteboardColor& getColor() const { 00033 return color_; 00034 } 00035 00036 void setColor(const WhiteboardColor& color) { 00037 color_ = color; 00038 } 00039 00040 int getPenWidth() const { 00041 return penWidth_; 00042 } 00043 00044 void setPenWidth(const int penWidth) { 00045 penWidth_ = penWidth; 00046 } 00047 00048 void accept(WhiteboardElementVisitor& visitor) { 00049 visitor.visit(*this); 00050 } 00051 00052 private: 00053 std::vector<Point> points_; 00054 WhiteboardColor color_; 00055 int penWidth_; 00056 }; 00057 }