/**
* 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);
/**
* 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);
*
* e.g.:
* <pre>
- * RS_Pen p(RS2::FlagInvalid);
+ * Pen p(RS2::FlagInvalid);
* </pre>
*/
-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()