You've already forked libart-paperback
Rename RGB to Color_RGB
All checks were successful
on-push / build-and-test (push) Successful in 26s
All checks were successful
on-push / build-and-test (push) Successful in 26s
This commit is contained in:
@@ -192,7 +192,7 @@ namespace Art::Paperback::Graphics
|
||||
///
|
||||
void
|
||||
Canvas::
|
||||
set_stroke(RGB const& color)
|
||||
set_stroke(Color_RGB const& color)
|
||||
{
|
||||
internal->write(color.red());
|
||||
internal->write(' ');
|
||||
@@ -210,7 +210,7 @@ namespace Art::Paperback::Graphics
|
||||
///
|
||||
void
|
||||
Canvas::
|
||||
set_fill(RGB const& color)
|
||||
set_fill(Color_RGB const& color)
|
||||
{
|
||||
internal->write(color.red());
|
||||
internal->write(' ');
|
||||
|
||||
@@ -64,12 +64,12 @@ namespace Art::Paperback::Graphics
|
||||
/// Set stroke RGB color.
|
||||
///
|
||||
void
|
||||
set_stroke(RGB const&);
|
||||
set_stroke(Color_RGB const&);
|
||||
|
||||
/// Set fill RGB color.
|
||||
///
|
||||
void
|
||||
set_fill(RGB const&);
|
||||
set_fill(Color_RGB const&);
|
||||
|
||||
class Path;
|
||||
friend Path;
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
namespace Art::Paperback::Graphics
|
||||
{
|
||||
|
||||
RGB::
|
||||
RGB()
|
||||
Color_RGB::
|
||||
Color_RGB()
|
||||
{}
|
||||
|
||||
/// \param red The red component.
|
||||
/// \param green The green component.
|
||||
/// \param blue The blue component.
|
||||
RGB::
|
||||
RGB(double red, double green, double blue)
|
||||
Color_RGB::
|
||||
Color_RGB(double red, double green, double blue)
|
||||
: _red{red},
|
||||
_green{green},
|
||||
_blue{blue}
|
||||
{}
|
||||
|
||||
/// \param other The RGB to copy from.
|
||||
/// \param other The Color_RGB to copy from.
|
||||
///
|
||||
RGB::
|
||||
RGB(RGB const& other)
|
||||
Color_RGB::
|
||||
Color_RGB(Color_RGB const& other)
|
||||
: _red{other._red},
|
||||
_green{other._green},
|
||||
_blue{other._blue}
|
||||
{}
|
||||
|
||||
/// \param other The RGB to move from.
|
||||
/// \param other The Color_RGB to move from.
|
||||
///
|
||||
RGB::
|
||||
RGB(RGB&& other)
|
||||
Color_RGB::
|
||||
Color_RGB(Color_RGB&& other)
|
||||
: _red{other._red},
|
||||
_green{other._green},
|
||||
_blue{other._blue}
|
||||
@@ -38,7 +38,7 @@ namespace Art::Paperback::Graphics
|
||||
/// \return Returns the red component.
|
||||
///
|
||||
double
|
||||
RGB::
|
||||
Color_RGB::
|
||||
red() const
|
||||
{
|
||||
return _red;
|
||||
@@ -47,7 +47,7 @@ namespace Art::Paperback::Graphics
|
||||
/// \return Returns the green component.
|
||||
///
|
||||
double
|
||||
RGB::
|
||||
Color_RGB::
|
||||
green() const
|
||||
{
|
||||
return _green;
|
||||
@@ -56,17 +56,17 @@ namespace Art::Paperback::Graphics
|
||||
/// \return Returns the blue component.
|
||||
///
|
||||
double
|
||||
RGB::
|
||||
Color_RGB::
|
||||
blue() const
|
||||
{
|
||||
return _blue;
|
||||
}
|
||||
|
||||
/// \param other The RGB to copy from.
|
||||
/// \param other The Color_RGB to copy from.
|
||||
///
|
||||
RGB&
|
||||
RGB::
|
||||
operator=(RGB const& other)
|
||||
Color_RGB&
|
||||
Color_RGB::
|
||||
operator=(Color_RGB const& other)
|
||||
{
|
||||
_red = other._red;
|
||||
_green = other._green;
|
||||
@@ -75,11 +75,11 @@ namespace Art::Paperback::Graphics
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// \param other The RGB to move from.
|
||||
/// \param other The Color_RGB to move from.
|
||||
///
|
||||
RGB&
|
||||
RGB::
|
||||
operator=(RGB&& other)
|
||||
Color_RGB&
|
||||
Color_RGB::
|
||||
operator=(Color_RGB&& other)
|
||||
{
|
||||
_red = other._red;
|
||||
_green = other._green;
|
||||
|
||||
@@ -22,24 +22,24 @@ namespace Art::Paperback::Graphics
|
||||
|
||||
/// Represents an RGB color value.
|
||||
///
|
||||
class RGB
|
||||
class Color_RGB
|
||||
{
|
||||
public:
|
||||
/// Constructor.
|
||||
///
|
||||
RGB();
|
||||
Color_RGB();
|
||||
|
||||
/// Constructor.
|
||||
///
|
||||
RGB(RGB const&);
|
||||
Color_RGB(Color_RGB const&);
|
||||
|
||||
/// Constructor.
|
||||
///
|
||||
RGB(RGB&&);
|
||||
Color_RGB(Color_RGB&&);
|
||||
|
||||
/// Constructor.
|
||||
///
|
||||
RGB(double, double, double);
|
||||
Color_RGB(double, double, double);
|
||||
|
||||
/// Access red component.
|
||||
///
|
||||
@@ -58,13 +58,13 @@ namespace Art::Paperback::Graphics
|
||||
|
||||
/// Assignment.
|
||||
///
|
||||
RGB&
|
||||
operator=(RGB const&);
|
||||
Color_RGB&
|
||||
operator=(Color_RGB const&);
|
||||
|
||||
/// Assignment.
|
||||
///
|
||||
RGB&
|
||||
operator=(RGB&&);
|
||||
Color_RGB&
|
||||
operator=(Color_RGB&&);
|
||||
|
||||
private:
|
||||
double _red{};
|
||||
|
||||
@@ -59,8 +59,8 @@ namespace Art::Paperback::Internals
|
||||
Graphics::Color_space cs_stroke{Graphics::Color_space::device_grey};
|
||||
Graphics::Color_space cs_fill{Graphics::Color_space::device_grey};
|
||||
|
||||
Graphics::RGB rgb_stroke;
|
||||
Graphics::RGB rgb_fill;
|
||||
Graphics::Color_RGB rgb_stroke;
|
||||
Graphics::Color_RGB rgb_fill;
|
||||
|
||||
double grey_stroke{};
|
||||
double grey_fill{};
|
||||
|
||||
Reference in New Issue
Block a user