18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtGui/qcolor.h>
29 return lhs.m_cmyk == rhs.m_cmyk;
35 constexpr QCmyk32(
int cyan,
int magenta,
int yellow,
int black) :
36#if Q_BYTE_ORDER == Q_BIG_ENDIAN
37 m_cmyk(uint(cyan) << 24 | magenta << 16 | yellow << 8 | black)
44#if Q_BYTE_ORDER == Q_BIG_ENDIAN
45 constexpr int cyan()
const noexcept {
return (m_cmyk >> 24) & 0xff; }
46 constexpr int magenta()
const noexcept {
return (m_cmyk >> 16) & 0xff; }
47 constexpr int yellow()
const noexcept {
return (m_cmyk >> 8) & 0xff; }
48 constexpr int black()
const noexcept {
return (m_cmyk ) & 0xff; }
50 constexpr int cyan()
const noexcept {
return (
m_cmyk ) & 0xff; }
51 constexpr int magenta()
const noexcept {
return (
m_cmyk >> 8) & 0xff; }
52 constexpr int yellow()
const noexcept {
return (
m_cmyk >> 16) & 0xff; }
53 constexpr int black()
const noexcept {
return (
m_cmyk >> 24) & 0xff; }
58 return QColor::fromCmyk(cyan(), magenta(), yellow(), black());
61 constexpr uint
toUint()
const noexcept
75 const QColor c = QColor(rgba).toCmyk();
76 return QCmyk32(c.cyan(), c.magenta(), c.yellow(), c.black());
81 QColor c = color.toCmyk();
82 return QCmyk32(c.cyan(), c.magenta(), c.yellow(), c.black());
88static_assert(
sizeof(
QCmyk32) ==
sizeof(
int));
89static_assert(
alignof(
QCmyk32) ==
alignof(
int));
90static_assert(std::is_standard_layout_v<QCmyk32>);
constexpr uint toUint() const noexcept
friend constexpr bool comparesEqual(const QCmyk32 &lhs, const QCmyk32 &rhs) noexcept
static constexpr QCmyk32 fromCmyk32(uint cmyk) noexcept
constexpr QCmyk32(int cyan, int magenta, int yellow, int black)
constexpr int black() const noexcept
static QCmyk32 fromRgba(QRgb rgba) noexcept
constexpr int magenta() const noexcept
constexpr int yellow() const noexcept
constexpr int cyan() const noexcept
static QCmyk32 fromColor(const QColor &color) noexcept
QColor toColor() const noexcept
static QColorMatrix identity()
QColorVector map(const QColorVector &c) const