Mapper  0.9.0
API documentation
Public Member Functions | Public Attributes | List of all members
OpenOrienteering::MapColorCmyk Struct Reference

The MapColorCmyk class provides a datatype for storing and transferring opaque CMYK colors. More...

#include <map_color.h>

Public Member Functions

 MapColorCmyk () noexcept=default
 Constructs a black color. More...
 
 MapColorCmyk (float c, float m, float y, float k) noexcept
 Constructs a color with the given components. More...
 
 MapColorCmyk (const MapColorCmyk &other) noexcept=default
 Constructs a copy of the given CMYK color. More...
 
 MapColorCmyk (const QColor &other) noexcept
 Constructs a CMYK color of the given QColor. More...
 
MapColorCmykoperator= (const MapColorCmyk &other)=default
 Assigns another color's value to this color. More...
 
 operator QColor () const
 Converts this color to a QColor. More...
 
bool isBlack () const
 Returns true if this color is black. More...
 
bool isWhite () const
 Returns true if this color is white. More...
 

Public Attributes

float c = 0
 The cyan component. More...
 
float m = 0
 The magenta component. More...
 
float y = 0
 The yellow component. More...
 
float k = 1
 The black component (aka key). More...
 

Detailed Description

The MapColorCmyk class provides a datatype for storing and transferring opaque CMYK colors.

Components (c, m, y, k) are floats in the range [0.0; 1.0].

Constructor & Destructor Documentation

◆ MapColorCmyk() [1/4]

OpenOrienteering::MapColorCmyk::MapColorCmyk ( )
defaultnoexcept

Constructs a black color.

◆ MapColorCmyk() [2/4]

OpenOrienteering::MapColorCmyk::MapColorCmyk ( float  c,
float  m,
float  y,
float  k 
)
inlinenoexcept

Constructs a color with the given components.

◆ MapColorCmyk() [3/4]

OpenOrienteering::MapColorCmyk::MapColorCmyk ( const MapColorCmyk other)
defaultnoexcept

Constructs a copy of the given CMYK color.

◆ MapColorCmyk() [4/4]

OpenOrienteering::MapColorCmyk::MapColorCmyk ( const QColor other)
inlinenoexcept

Constructs a CMYK color of the given QColor.

Used for type conversions.

Member Function Documentation

◆ isBlack()

bool OpenOrienteering::MapColorCmyk::isBlack ( ) const
inline

Returns true if this color is black.

◆ isWhite()

bool OpenOrienteering::MapColorCmyk::isWhite ( ) const
inline

Returns true if this color is white.

◆ operator QColor()

OpenOrienteering::MapColorCmyk::operator QColor ( ) const
inline

Converts this color to a QColor.

◆ operator=()

MapColorCmyk& OpenOrienteering::MapColorCmyk::operator= ( const MapColorCmyk other)
default

Assigns another color's value to this color.

Member Data Documentation

◆ c

float OpenOrienteering::MapColorCmyk::c = 0

The cyan component.

◆ k

float OpenOrienteering::MapColorCmyk::k = 1

The black component (aka key).

◆ m

float OpenOrienteering::MapColorCmyk::m = 0

The magenta component.

◆ y

float OpenOrienteering::MapColorCmyk::y = 0

The yellow component.


The documentation for this struct was generated from the following file: