Pioneer
ColorMap.h
Go to the documentation of this file.
1 // Copyright © 2008-2023 Pioneer Developers. See AUTHORS.txt for details
2 // Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
3 
4 #ifndef _SCENEGRAPH_COLORMAP_H
5 #define _SCENEGRAPH_COLORMAP_H
6 /*
7  * Color look-up texture generator for newmodel pattern system
8  */
9 #include "graphics/Texture.h"
10 #include "libs.h"
11 #include <SDL_stdinc.h>
12 
13 namespace Graphics {
14  class Renderer;
15 }
16 
17 namespace SceneGraph {
18 
19  class ColorMap {
20  public:
21  ColorMap();
23  void Generate(Graphics::Renderer *r, const Color &a, const Color &b, const Color &c);
24  void SetSmooth(bool);
25 
26  private:
27  void AddColor(int width, const Color &c, std::vector<Uint8> &out);
28 
29  bool m_smooth;
31  };
32 
33 } // namespace SceneGraph
34 
35 #endif
Definition: Renderer.h:44
Definition: Texture.h:106
Definition: ColorMap.h:19
void SetSmooth(bool)
Definition: ColorMap.cpp:50
void Generate(Graphics::Renderer *r, const Color &a, const Color &b, const Color &c)
Definition: ColorMap.cpp:30
ColorMap()
Definition: ColorMap.cpp:10
Graphics::Texture * GetTexture()
Definition: ColorMap.cpp:15
Definition: Background.h:14
Definition: CityOnPlanet.h:31
Definition: Color.h:66