• Main Page
  • Classes
  • Files
  • File List

Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h

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 namespace Swift {
00013   class WhiteboardPolygonElement : public WhiteboardElement {
00014     typedef std::pair<int, int> Point;
00015   public:
00016     typedef boost::shared_ptr<WhiteboardPolygonElement> ref;
00017   public:
00018     WhiteboardPolygonElement() {
00019     }
00020 
00021     const std::vector<Point>& getPoints() const {
00022       return points_;
00023     }
00024 
00025     void setPoints(const std::vector<Point>& points) {
00026       points_ = points;
00027     }
00028 
00029     const WhiteboardColor& getPenColor() const {
00030       return penColor_;
00031     }
00032 
00033     void setPenColor(const WhiteboardColor& color) {
00034       penColor_ = color;
00035     }
00036 
00037     const WhiteboardColor& getBrushColor() const {
00038       return brushColor_;
00039     }
00040 
00041     void setBrushColor(const WhiteboardColor& color) {
00042       brushColor_ = color;
00043     }
00044 
00045     int getPenWidth() const {
00046       return penWidth_;
00047     }
00048 
00049     void setPenWidth(const int penWidth) {
00050       penWidth_ = penWidth;
00051     }
00052 
00053     void accept(WhiteboardElementVisitor& visitor) {
00054       visitor.visit(*this);
00055     }
00056 
00057   private:
00058     std::vector<Point> points_;
00059     WhiteboardColor penColor_;
00060     WhiteboardColor brushColor_;
00061     int penWidth_;
00062   };
00063 }

Generated on Fri Oct 12 2012 21:00:19 for Swiften by  doxygen 1.7.1