00001
00002
00003
00004
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 WhiteboardLineElement : public WhiteboardElement {
00014 public:
00015 typedef boost::shared_ptr<WhiteboardLineElement> ref;
00016 public:
00017 WhiteboardLineElement(int x1, int y1, int x2, int y2) {
00018 x1_ = x1;
00019 y1_ = y1;
00020 x2_ = x2;
00021 y2_ = y2;
00022 }
00023
00024 int x1() const {
00025 return x1_;
00026 }
00027
00028 int y1() const {
00029 return y1_;
00030 }
00031
00032 int x2() const {
00033 return x2_;
00034 }
00035
00036 int y2() const {
00037 return y2_;
00038 }
00039
00040 const WhiteboardColor& getColor() const {
00041 return color_;
00042 }
00043
00044 void setColor(const WhiteboardColor& color) {
00045 color_ = color;
00046 }
00047
00048 int getPenWidth() const {
00049 return penWidth_;
00050 }
00051
00052 void setPenWidth(const int penWidth) {
00053 penWidth_ = penWidth;
00054 }
00055
00056 void accept(WhiteboardElementVisitor& visitor) {
00057 visitor.visit(*this);
00058 }
00059
00060 private:
00061 int x1_, y1_, x2_, y2_;
00062 WhiteboardColor color_;
00063 int penWidth_;
00064 };
00065 }