X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fpen.cpp;fp=src%2Fbase%2Fpen.cpp;h=4e96d6f6e44668e5e12ff6036ef25e42381f6d05;hb=16354e0421b316a62c6b9f7b0b4f3b8cf6f06284;hp=ee68475fe3e9372ea2a9f4d34455b20795ca349e;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/base/pen.cpp b/src/base/pen.cpp index ee68475..4e96d6f 100644 --- a/src/base/pen.cpp +++ b/src/base/pen.cpp @@ -19,9 +19,9 @@ /** * Creates a default pen (black, solid, width 0). */ -RS_Pen::RS_Pen(): RS_Flags() +Pen::Pen(): Flags() { - setColor(RS_Color(0, 0, 0)); + setColor(Color(0, 0, 0)); setWidth(RS2::Width00); setLineType(RS2::SolidLine); setScreenWidth(0); @@ -30,7 +30,7 @@ RS_Pen::RS_Pen(): RS_Flags() /** * Creates a pen with the given attributes. */ -RS_Pen::RS_Pen(const RS_Color & c, RS2::LineWidth w, RS2::LineType t): RS_Flags() +Pen::Pen(const Color & c, RS2::LineWidth w, RS2::LineType t): Flags() { setColor(c); setWidth(w); @@ -44,77 +44,77 @@ RS_Pen::RS_Pen(const RS_Color & c, RS2::LineWidth w, RS2::LineType t): RS_Flags( * * e.g.: *
- *   RS_Pen p(RS2::FlagInvalid);
+ *   Pen p(RS2::FlagInvalid);
  * 
*/ -RS_Pen::RS_Pen(unsigned int f): RS_Flags(f) +Pen::Pen(unsigned int f): Flags(f) { - setColor(RS_Color(0, 0, 0)); + setColor(Color(0, 0, 0)); setWidth(RS2::Width00); setLineType(RS2::SolidLine); setScreenWidth(0); } -/*virtual*/ RS_Pen::~RS_Pen() +/*virtual*/ Pen::~Pen() { } -RS2::LineType RS_Pen::getLineType() const +RS2::LineType Pen::getLineType() const { return lineType; } -void RS_Pen::setLineType(RS2::LineType t) +void Pen::setLineType(RS2::LineType t) { lineType = t; } -RS2::LineWidth RS_Pen::getWidth() const +RS2::LineWidth Pen::getWidth() const { return width; } -void RS_Pen::setWidth(RS2::LineWidth w) +void Pen::setWidth(RS2::LineWidth w) { width = w; } -double RS_Pen::getScreenWidth() const +double Pen::getScreenWidth() const { return screenWidth; } -void RS_Pen::setScreenWidth(double w) +void Pen::setScreenWidth(double w) { screenWidth = w; } -const RS_Color & RS_Pen::getColor() const +const Color & Pen::getColor() const { return color; } -void RS_Pen::setColor(const RS_Color & c) +void Pen::setColor(const Color & c) { color = c; } -bool RS_Pen::isValid() +bool Pen::isValid() { return !getFlag(RS2::FlagInvalid); } -bool RS_Pen::operator==(const RS_Pen & p) const +bool Pen::operator==(const Pen & p) const { return (lineType == p.lineType && width == p.width && color == p.color); } -bool RS_Pen::operator!=(const RS_Pen & p) const +bool Pen::operator!=(const Pen & p) const { return !(*this == p); } -/*friend*/ std::ostream & operator<<(std::ostream & os, const RS_Pen & p) +/*friend*/ std::ostream & operator<<(std::ostream & os, const Pen & p) { //os << "style: " << p.style << std::endl; os << " pen color: " << p.getColor()