• Main Page
  • Classes
  • Files
  • File List

Swiften/Elements/Whiteboard/WhiteboardEllipseElement.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 WhiteboardEllipseElement : public WhiteboardElement {
00014   public:
00015     typedef boost::shared_ptr<WhiteboardEllipseElement> ref;
00016   public:
00017     WhiteboardEllipseElement(int cx, int cy, int rx, int ry) {
00018       cx_ = cx;
00019       cy_ = cy;
00020       rx_ = rx;
00021       ry_ = ry;
00022     }
00023 
00024     int getCX() const {
00025       return cx_;
00026     }
00027 
00028     int getCY() const {
00029       return cy_;
00030     }
00031 
00032     int getRX() const {
00033       return rx_;
00034     }
00035 
00036     int getRY() const {
00037       return ry_;
00038     }
00039 
00040     const WhiteboardColor& getPenColor() const {
00041       return penColor_;
00042     }
00043 
00044     void setPenColor(const WhiteboardColor& color) {
00045       penColor_ = color;
00046     }
00047 
00048     const WhiteboardColor& getBrushColor() const {
00049       return brushColor_;
00050     }
00051 
00052     void setBrushColor(const WhiteboardColor& color) {
00053       brushColor_ = color;
00054     }
00055 
00056     int getPenWidth() const {
00057       return penWidth_;
00058     }
00059 
00060     void setPenWidth(const int penWidth) {
00061       penWidth_ = penWidth;
00062     }
00063 
00064     void accept(WhiteboardElementVisitor& visitor) {
00065       visitor.visit(*this);
00066     }
00067 
00068   private:
00069     int cx_, cy_, rx_, ry_;
00070     WhiteboardColor penColor_;
00071     WhiteboardColor brushColor_;
00072     int penWidth_;
00073   };
00074 }

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