Blame src/lib/ColorReference.h

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