FastUIDraw
painter_blend_shader_set.hpp
Go to the documentation of this file.
1 /*!
2  * \file painter_blend_shader_set.hpp
3  * \brief file painter_blend_shader_set.hpp
4  *
5  * Copyright 2016 by Intel.
6  *
7  * Contact: kevin.rogovin@gmail.com
8  *
9  * This Source Code Form is subject to the
10  * terms of the Mozilla Public License, v. 2.0.
11  * If a copy of the MPL was not distributed with
12  * this file, You can obtain one at
13  * http://mozilla.org/MPL/2.0/.
14  *
15  * \author Kevin Rogovin <kevin.rogovin@gmail.com>
16  *
17  */
18 
19 
20 #ifndef FASTUIDRAW_PAINTER_BLEND_SHADER_SET_HPP
21 #define FASTUIDRAW_PAINTER_BLEND_SHADER_SET_HPP
22 
26 
27 namespace fastuidraw
28 {
29 
30 /*!\addtogroup PainterShaders
31  * @{
32  */
33 
34  /*!
35  * \brief
36  * A PainterBlendShaderSet represents a set of shaders
37  * for the blend modes enumerated by PainterEnums::blend_mode_t
38  */
40  {
41  public:
42  /*!
43  * Ctor, inits as all return value from shader(enum glyph_type)
44  * return a PainterItemShader with no shaders
45  */
47 
48  /*!
49  * Copy ctor.
50  */
52 
54 
55  /*!
56  * Assignment operator.
57  */
59  operator=(const PainterBlendShaderSet &rhs);
60 
61  /*!
62  * Swap operation
63  * \param obj object with which to swap
64  */
65  void
67 
68  /*!
69  * Return the PainterShader for a given
70  * PainterEnums::blend_mode_t.
71  * \param tp blend mode
72  */
74  shader(enum PainterEnums::blend_mode_t tp) const;
75 
76  /*!
77  * Returns the BlendMode for a given PainterEnums::blend_mode_t.
78  * \param tp blend mode
79  */
80  BlendMode
82 
83  /*!
84  * Set the PainterShader for a given
85  * PainterEnums::blend_mode_t.
86  * \param tp blend shader being specified
87  * \param mode 3D API BlendMode to use
88  * \param sh PainterShader to use for the blend mode
89  */
92  const BlendMode &mode,
94 
95  /*!
96  * Returns the one plus the largest value for which
97  * shader(enum PainterEnums::blend_mode_t, const reference_counted_ptr<PainterShader>&)
98  * was called.
99  */
100  unsigned int
101  shader_count(void) const;
102 
103  private:
104  void *m_d;
105  };
106 
107 /*! @} */
108 }
109 
110 #endif
all classes and functions of FastUIDraw are in the namespace fastuidraw.
Definition: colorstop.hpp:28
void swap(PainterBlendShaderSet &obj)
blend_mode_t
Enumeration specifying blend modes. The following function-formulas are used in a number of the blend...
A wrapper over a pointer to implement reference counting.
const reference_counted_ptr< PainterBlendShader > & shader(enum PainterEnums::blend_mode_t tp) const
file blend_mode.hpp
A PainterBlendShaderSet represents a set of shaders for the blend modes enumerated by PainterEnums::b...
PainterBlendShaderSet & operator=(const PainterBlendShaderSet &rhs)
file painter_enums.hpp
BlendMode blend_mode(enum PainterEnums::blend_mode_t tp) const
Class to hold the blend mode as exposed by typical 3D APIs.
Definition: blend_mode.hpp:37
unsigned int shader_count(void) const
file painter_blend_shader.hpp