_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Classes
color.h File Reference
#include <stdint.h>
#include <vector>

Go to the source code of this file.

Classes

class  CColor
 A platform independent color. More...
 
class  CUnitColors
 
class  PaletteSwap
 A class to encode unit-variable dependent palette swaps. More...
 

color.h - The A platform independent color headerfile.

typedef uint32_t IntColor
 
IntColor InterpolateColor (IntColor color1, IntColor color2, float fraction)
 

Typedef Documentation

◆ IntColor

typedef uint32_t IntColor

Function Documentation

◆ InterpolateColor()

IntColor InterpolateColor ( IntColor  color1,
IntColor  color2,
float  fraction 
)

interpolate 2 RGB colors

Parameters
color1integer containing color as 0x00RRGGBB
color2integer containing color as 0x00RRGGBB
fractionhow much interpolation (0..1)
  • 0: full color 1
  • 1: full color 2
Returns
the new color after interpolation
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.