[LyX/master] Rename RGBColor to ARGBColor
Koji Yokota <[email protected]> Tue, 02 Jun 2026 04:51:31 +0000
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 79eb823b816562e98b5b0c4b723fe1442a54b0a5 Author: Koji Yokota <[email protected]> Date: Fri May 29 13:55:57 2026 +0900 Rename RGBColor to ARGBColor --- src/Color.cpp | 6 +++--- src/ColorCode.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Color.cpp b/src/Color.cpp index 2d77e7b7fb..6c3387fe41 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -69,8 +69,8 @@ string const X11hexname(RGBColor const & col) ostr << '#' << setbase(16) << setfill('0'); - if (typeid(col) == typeid(RGBAColor)) - ostr << setw(2) << ((RGBAColor const &)col).a; + if (typeid(col) == typeid(ARGBColor)) + ostr << setw(2) << ((ARGBColor const &)col).a; ostr << setw(2) << col.r << setw(2) << col.g @@ -91,7 +91,7 @@ RGBColor rgbFromHexName(string const & x11hexname) c.b = hexstrToInt(x11hexname.substr(5, 2)); return c; } else { - RGBAColor c; + ARGBColor c; c.a = hexstrToInt(x11hexname.substr(1, 2)); c.r = hexstrToInt(x11hexname.substr(3, 2)); c.g = hexstrToInt(x11hexname.substr(5, 2)); diff --git a/src/ColorCode.h b/src/ColorCode.h index 5c5b9cd039..3492498746 100644 --- a/src/ColorCode.h +++ b/src/ColorCode.h @@ -272,10 +272,10 @@ struct RGBColor { : r(red), g(green), b(blue) {} }; -struct RGBAColor : public RGBColor { +struct ARGBColor : public RGBColor { unsigned int a; - RGBAColor() : RGBColor(), a(255) {} - RGBAColor(unsigned int red, unsigned int green, unsigned int blue, + ARGBColor() : RGBColor(), a(255) {} + ARGBColor(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha = 255) : RGBColor(red, green, blue), a(alpha) {} }; @@ -292,13 +292,13 @@ inline bool operator!=(RGBColor const & c1, RGBColor const & c2) } -inline bool operator==(RGBAColor const & c1, RGBAColor const & c2) +inline bool operator==(ARGBColor const & c1, ARGBColor const & c2) { return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b && c1.a == c2.a); } -inline bool operator!=(RGBAColor const & c1, RGBAColor const & c2) +inline bool operator!=(ARGBColor const & c1, ARGBColor const & c2) { return !(c1 == c2); } -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs