FastUIDraw
painter_glyph_shader.hpp
Go to the documentation of this file.
1 /*!
2  * \file painter_glyph_shader.hpp
3  * \brief file painter_glyph_shader.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_GLYPH_SHADER_HPP
21 #define FASTUIDRAW_PAINTER_GLYPH_SHADER_HPP
22 
25 
26 namespace fastuidraw
27 {
28 
29 /*!\addtogroup PainterShaders
30  * @{
31  */
32 
33  /*!
34  * \brief
35  * A PainterGlyphShader holds a shader for each \ref glyph_type.
36  * The shaders are to handle attribute data as packed by
37  * Glyph::pack_glyph().
38  */
40  {
41  public:
42  /*!
43  * Ctor, inits as return value from shader(enum glyph_type)
44  * as a nullptr for each \ref glyph_type value.
45  */
46  PainterGlyphShader(void);
47 
48  /*!
49  * Copy ctor.
50  */
52 
54 
55  /*!
56  * Assignment operator.
57  */
59  operator=(const PainterGlyphShader &rhs);
60 
61  /*!
62  * Swap operation
63  * \param obj object with which to swap
64  */
65  void
67 
68  /*!
69  * Return the PainterItemShader for a given \ref glyph_type.
70  * \param tp glyph type to render
71  */
73  shader(enum glyph_type tp) const;
74 
75  /*!
76  * Set the PainterItemShader for a given \ref glyph_type.
77  * \param tp glyph type to render
78  * \param sh PainterItemShader to use for the glyph type
79  */
82 
83  /*!
84  * Returns the one plus the largest value for which
85  * shader(enum glyph_type, PainterItemShader)
86  * was called.
87  */
88  unsigned int
89  shader_count(void) const;
90 
91  private:
92  void *m_d;
93  };
94 
95 /*! @} */
96 }
97 
98 #endif
all classes and functions of FastUIDraw are in the namespace fastuidraw.
Definition: colorstop.hpp:28
A wrapper over a pointer to implement reference counting.
unsigned int shader_count(void) const
PainterGlyphShader & operator=(const PainterGlyphShader &rhs)
glyph_type
Provides an enumeration of the rendering data for a glyph.
file painter_item_shader.hpp
const reference_counted_ptr< PainterItemShader > & shader(enum glyph_type tp) const
A PainterGlyphShader holds a shader for each glyph_type. The shaders are to handle attribute data as ...
file glyph.hpp
void swap(PainterGlyphShader &obj)