ColorReference.h
Go to the documentation of this file.
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* This file is part of the libmspub project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_COLORREFERENCE_H
#define INCLUDED_COLORREFERENCE_H
#include <vector>
#include "MSPUBTypes.h"
namespace libmspub
{
class ColorReference
{
unsigned m_baseColor;
unsigned m_modifiedColor;
// static const unsigned char COLOR_PALETTE;
static const unsigned char CHANGE_INTENSITY;
static const unsigned char BLACK_BASE;
static const unsigned char WHITE_BASE;
Color getRealColor(unsigned c, const std::vector<Color> &palette) const;
public:
explicit ColorReference(unsigned color) : m_baseColor(color), m_modifiedColor(color) { }
ColorReference(unsigned baseColor, unsigned modifiedColor) : m_baseColor(baseColor), m_modifiedColor(modifiedColor) { }
Color getFinalColor(const std::vector<Color> &palette) const;
public:
friend bool operator==(const libmspub::ColorReference &, const libmspub::ColorReference &);
};
}
#endif /* INCLUDED_COLORREFERENCE_H */
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
MSPUBTypes.h
libmspub::ColorReference
Definition ColorReference.h:20
libmspub::ColorReference::ColorReference
ColorReference(unsigned color)
Definition ColorReference.h:29
libmspub::ColorReference::BLACK_BASE
static const unsigned char BLACK_BASE
Definition ColorReference.h:25
libmspub::ColorReference::CHANGE_INTENSITY
static const unsigned char CHANGE_INTENSITY
Definition ColorReference.h:24
libmspub::ColorReference::m_modifiedColor
unsigned m_modifiedColor
Definition ColorReference.h:22
libmspub::ColorReference::getFinalColor
Color getFinalColor(const std::vector< Color > &palette) const
Definition ColorReference.cpp:28
libmspub::ColorReference::WHITE_BASE
static const unsigned char WHITE_BASE
Definition ColorReference.h:26
libmspub::ColorReference::operator==
friend bool operator==(const libmspub::ColorReference &, const libmspub::ColorReference &)
Definition ColorReference.cpp:52
libmspub::ColorReference::m_baseColor
unsigned m_baseColor
Definition ColorReference.h:21
libmspub::ColorReference::ColorReference
ColorReference(unsigned baseColor, unsigned modifiedColor)
Definition ColorReference.h:30
libmspub::ColorReference::getRealColor
Color getRealColor(unsigned c, const std::vector< Color > &palette) const
Definition ColorReference.cpp:15
libmspub
Definition Arrow.h:14
libmspub::Color
Definition MSPUBTypes.h:200