/usr/include/Nux-4.0/Nux/PaintLayer.h is in libnux-4.0-dev 4.0.8+17.10.20170922-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | /*
* Copyright 2010 Inalogic® Inc.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License, as
* published by the Free Software Foundation; either version 2.1 or 3.0
* of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranties of
* MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the applicable version of the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of both the GNU Lesser General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>
*
* Authored by: Jay Taoko <jaytaoko@inalogic.com>
*
*/
#ifndef PAINTLAYER_H
#define PAINTLAYER_H
#include "AbstractPaintLayer.h"
#include "NuxGraphics/GraphicsEngine.h"
namespace nux
{
class BaseTexture;
class ColorLayer: public AbstractPaintLayer
{
public:
ColorLayer(const Color& color, bool WriteAlpha = false, const ROPConfig& ROP = ROPConfig::Default);
void SetColor(const Color& color);
Color GetColor() const;
virtual void Renderlayer(GraphicsEngine& graphics_engine);
virtual AbstractPaintLayer* Clone() const;
private:
Color _color;
bool m_write_alpha;
ROPConfig m_rop;
};
class ShapeLayer: public AbstractPaintLayer
{
public:
ShapeLayer(UXStyleImageRef imageStyle, const Color& color, unsigned long Corners = eAllCorners, bool WriteAlpha = false, const ROPConfig& ROP = ROPConfig::Default);
virtual void Renderlayer(GraphicsEngine& graphics_engine);
virtual AbstractPaintLayer* Clone() const;
private:
UXStyleImageRef m_image_style;
Color m_color;
bool m_write_alpha;
ROPConfig m_rop;
unsigned long m_corners;
};
class SliceScaledTextureLayer: public AbstractPaintLayer
{
public:
SliceScaledTextureLayer(UXStyleImageRef imageStyle, const Color& color, unsigned long Corners = eAllCorners, bool WriteAlpha = false, const ROPConfig& ROP = ROPConfig::Default);
virtual void Renderlayer(GraphicsEngine& graphics_engine);
virtual AbstractPaintLayer* Clone() const;
private:
UXStyleImageRef m_image_style;
Color m_color;
bool m_write_alpha;
ROPConfig m_rop;
unsigned long m_corners;
};
class CompositionLayer: public AbstractPaintLayer
{
public:
//! Layer blend operation.
/*!
Blend(texture0*color0, texture1*color1);
*/
CompositionLayer(ObjectPtr <IOpenGLBaseTexture> texture0, TexCoordXForm texxform0, const Color& color0,
ObjectPtr <IOpenGLBaseTexture> texture1, TexCoordXForm texxform1, const Color& color1,
LayerBlendMode layer_blend_mode,
bool write_alpha, const ROPConfig& ROP);
//! Layer blend operation.
/*!
Blend(texture0*color0, blend_color);
*/
CompositionLayer(ObjectPtr <IOpenGLBaseTexture> texture0, TexCoordXForm texxform0, const Color& color0,
const Color& blend_color, LayerBlendMode layer_blend_mode,
bool write_alpha, const ROPConfig& ROP);
//! Layer blend operation.
/*!
Blend(texture0*color0, color0);
*/
CompositionLayer(const Color& base_color, ObjectPtr <IOpenGLBaseTexture> texture0,
TexCoordXForm texxform0, const Color& color0,
LayerBlendMode layer_blend_mode,
bool write_alpha, const ROPConfig& ROP);
CompositionLayer(const Color& base_color, const Color& blend_color, LayerBlendMode layer_blend_mode,
bool write_alpha, const ROPConfig& ROP);
virtual ~CompositionLayer();
virtual void Renderlayer(GraphicsEngine& graphics_engine);
virtual AbstractPaintLayer* Clone() const;
private:
ObjectPtr <IOpenGLBaseTexture > m_source_texture;
Color m_source_texture_color;
TexCoordXForm m_source_texture_texxform;
ObjectPtr <IOpenGLBaseTexture> m_foreground_texture;
Color m_foreground_texture_color;
TexCoordXForm m_foreground_texture_texxform;
Color m_source_color;
Color m_foreground_color;
bool m_write_alpha;
ROPConfig m_rop;
LayerBlendMode m_blend_mode;
};
class TextureLayer: public AbstractPaintLayer
{
public:
TextureLayer(ObjectPtr< IOpenGLBaseTexture > device_texture, TexCoordXForm texxform, const Color& color, bool WriteAlpha = false, const ROPConfig& ROP = ROPConfig::Default);
TextureLayer(ObjectPtr<IOpenGLBaseTexture> device_texture, TexCoordXForm texxform, const Color& color0,
bool write_alpha, const ROPConfig& ROP, const Color& blend_color, LayerBlendMode color_blend_mode);
virtual ~TextureLayer();
virtual void Renderlayer(GraphicsEngine& graphics_engine);
virtual AbstractPaintLayer* Clone() const;
virtual ObjectPtr< IOpenGLBaseTexture> GetDeviceTexture();
private:
ObjectPtr< IOpenGLBaseTexture > m_device_texture;
Color m_color;
bool m_write_alpha;
ROPConfig m_rop;
TexCoordXForm m_texxform;
Color m_blend_color;
LayerBlendMode m_color_blend_mode;
};
}
#endif // PAINTLAYER_H
|