mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
Add src/driver/colorgradient.cpp
This commit is contained in:
58
src/driver/colorgradient.h
Normal file
58
src/driver/colorgradient.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
color gradient - Neutrino-GUI
|
||||
Copyright (C) 2014 M. Liebmann (micha-bbg)
|
||||
|
||||
License: GPL
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public
|
||||
License along with this program; if not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __CCOLORGRADIENT__
|
||||
#define __CCOLORGRADIENT__
|
||||
|
||||
#include <driver/framebuffer.h>
|
||||
|
||||
class CColorGradient
|
||||
{
|
||||
private:
|
||||
CFrameBuffer * frameBuffer;
|
||||
|
||||
inline uint8_t limitChar(int c);
|
||||
|
||||
public:
|
||||
|
||||
enum {
|
||||
gradientDark2Light,
|
||||
gradientLight2Dark,
|
||||
gradientDark2Light2Dark,
|
||||
gradientLight2Dark2Light
|
||||
};
|
||||
|
||||
enum {
|
||||
light,
|
||||
normal
|
||||
};
|
||||
|
||||
CColorGradient();
|
||||
~CColorGradient();
|
||||
// static CColorGradient* getInstance();
|
||||
|
||||
fb_pixel_t* gradientOneColor(fb_pixel_t col, fb_pixel_t *gradientBuf, int bSize, int mode, int intensity=normal);
|
||||
fb_pixel_t* gradientColorToTransparent(fb_pixel_t col, fb_pixel_t *gradientBuf, int bSize, int mode, int intensity=normal);
|
||||
|
||||
};
|
||||
|
||||
#endif // __CCOLORGRADIENT__
|
Reference in New Issue
Block a user