Rename RGB to Color_RGB
All checks were successful
on-push / build-and-test (push) Successful in 26s

This commit is contained in:
2025-12-01 05:48:03 +01:00
parent 6cfb014a4d
commit 46a34911f0
5 changed files with 36 additions and 36 deletions

View File

@@ -192,7 +192,7 @@ namespace Art::Paperback::Graphics
/// ///
void void
Canvas:: Canvas::
set_stroke(RGB const& color) set_stroke(Color_RGB const& color)
{ {
internal->write(color.red()); internal->write(color.red());
internal->write(' '); internal->write(' ');
@@ -210,7 +210,7 @@ namespace Art::Paperback::Graphics
/// ///
void void
Canvas:: Canvas::
set_fill(RGB const& color) set_fill(Color_RGB const& color)
{ {
internal->write(color.red()); internal->write(color.red());
internal->write(' '); internal->write(' ');

View File

@@ -64,12 +64,12 @@ namespace Art::Paperback::Graphics
/// Set stroke RGB color. /// Set stroke RGB color.
/// ///
void void
set_stroke(RGB const&); set_stroke(Color_RGB const&);
/// Set fill RGB color. /// Set fill RGB color.
/// ///
void void
set_fill(RGB const&); set_fill(Color_RGB const&);
class Path; class Path;
friend Path; friend Path;

View File

@@ -3,33 +3,33 @@
namespace Art::Paperback::Graphics namespace Art::Paperback::Graphics
{ {
RGB:: Color_RGB::
RGB() Color_RGB()
{} {}
/// \param red The red component. /// \param red The red component.
/// \param green The green component. /// \param green The green component.
/// \param blue The blue component. /// \param blue The blue component.
RGB:: Color_RGB::
RGB(double red, double green, double blue) Color_RGB(double red, double green, double blue)
: _red{red}, : _red{red},
_green{green}, _green{green},
_blue{blue} _blue{blue}
{} {}
/// \param other The RGB to copy from. /// \param other The Color_RGB to copy from.
/// ///
RGB:: Color_RGB::
RGB(RGB const& other) Color_RGB(Color_RGB const& other)
: _red{other._red}, : _red{other._red},
_green{other._green}, _green{other._green},
_blue{other._blue} _blue{other._blue}
{} {}
/// \param other The RGB to move from. /// \param other The Color_RGB to move from.
/// ///
RGB:: Color_RGB::
RGB(RGB&& other) Color_RGB(Color_RGB&& other)
: _red{other._red}, : _red{other._red},
_green{other._green}, _green{other._green},
_blue{other._blue} _blue{other._blue}
@@ -38,7 +38,7 @@ namespace Art::Paperback::Graphics
/// \return Returns the red component. /// \return Returns the red component.
/// ///
double double
RGB:: Color_RGB::
red() const red() const
{ {
return _red; return _red;
@@ -47,7 +47,7 @@ namespace Art::Paperback::Graphics
/// \return Returns the green component. /// \return Returns the green component.
/// ///
double double
RGB:: Color_RGB::
green() const green() const
{ {
return _green; return _green;
@@ -56,17 +56,17 @@ namespace Art::Paperback::Graphics
/// \return Returns the blue component. /// \return Returns the blue component.
/// ///
double double
RGB:: Color_RGB::
blue() const blue() const
{ {
return _blue; return _blue;
} }
/// \param other The RGB to copy from. /// \param other The Color_RGB to copy from.
/// ///
RGB& Color_RGB&
RGB:: Color_RGB::
operator=(RGB const& other) operator=(Color_RGB const& other)
{ {
_red = other._red; _red = other._red;
_green = other._green; _green = other._green;
@@ -75,11 +75,11 @@ namespace Art::Paperback::Graphics
return *this; return *this;
} }
/// \param other The RGB to move from. /// \param other The Color_RGB to move from.
/// ///
RGB& Color_RGB&
RGB:: Color_RGB::
operator=(RGB&& other) operator=(Color_RGB&& other)
{ {
_red = other._red; _red = other._red;
_green = other._green; _green = other._green;

View File

@@ -22,24 +22,24 @@ namespace Art::Paperback::Graphics
/// Represents an RGB color value. /// Represents an RGB color value.
/// ///
class RGB class Color_RGB
{ {
public: public:
/// Constructor. /// Constructor.
/// ///
RGB(); Color_RGB();
/// Constructor. /// Constructor.
/// ///
RGB(RGB const&); Color_RGB(Color_RGB const&);
/// Constructor. /// Constructor.
/// ///
RGB(RGB&&); Color_RGB(Color_RGB&&);
/// Constructor. /// Constructor.
/// ///
RGB(double, double, double); Color_RGB(double, double, double);
/// Access red component. /// Access red component.
/// ///
@@ -58,13 +58,13 @@ namespace Art::Paperback::Graphics
/// Assignment. /// Assignment.
/// ///
RGB& Color_RGB&
operator=(RGB const&); operator=(Color_RGB const&);
/// Assignment. /// Assignment.
/// ///
RGB& Color_RGB&
operator=(RGB&&); operator=(Color_RGB&&);
private: private:
double _red{}; double _red{};

View File

@@ -59,8 +59,8 @@ namespace Art::Paperback::Internals
Graphics::Color_space cs_stroke{Graphics::Color_space::device_grey}; Graphics::Color_space cs_stroke{Graphics::Color_space::device_grey};
Graphics::Color_space cs_fill{Graphics::Color_space::device_grey}; Graphics::Color_space cs_fill{Graphics::Color_space::device_grey};
Graphics::RGB rgb_stroke; Graphics::Color_RGB rgb_stroke;
Graphics::RGB rgb_fill; Graphics::Color_RGB rgb_fill;
double grey_stroke{}; double grey_stroke{};
double grey_fill{}; double grey_fill{};