FastUIDraw
painter_custom_brush.hpp
1 /*!
2  * \file painter_data.hpp
3  * \brief file painter_data.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 #ifndef FASTUIDRAW_PAINTER_CUSTOM_BRUSH_HPP
20 #define FASTUIDRAW_PAINTER_CUSTOM_BRUSH_HPP
21 
25 
26 namespace fastuidraw
27 {
28 /*!\addtogroup Painter
29  * @{
30  */
31 
32  /*!
33  * \brief
34  * A PainterCustomBrush is just a conveniance to wrap a
35  * pointer to a \ref PainterBrushShader
36  * together with a PainterDataValue<PainterBrushShaderData>.
37  */
39  {
40  public:
41  /*!
42  * Ctor.
43  * \param sh value with which to initialize \ref m_shader
44  * \param d value with which to initialize \ref m_data
45  */
49  m_shader(sh),
50  m_data(d)
51  {}
52 
53  /*!
54  * Ctor.
55  * \param sh value with which to initialize \ref m_shader
56  * \param d value with which to initialize \ref m_data
57  */
59  const PainterBrushShader *sh):
60  m_shader(sh),
61  m_data(d)
62  {}
63 
64  /*!
65  * What \ref PainterBrushShader is used
66  */
68 
69  /*!
70  * What, if any, data for \ref m_shader to use.
71  */
73  };
74 /*! @} */
75 }
76 
77 #endif
all classes and functions of FastUIDraw are in the namespace fastuidraw.
Definition: colorstop.hpp:28
file painter_brush_shader.hpp
const PainterBrushShader * m_shader
file painter_data_value.hpp
file painter_brush_shader_data.hpp
A PainterCustomBrush is just a conveniance to wrap a pointer to a PainterBrushShader together with a ...
PainterDataValue< PainterBrushShaderData > m_data
PainterCustomBrush(const PainterDataValue< PainterBrushShaderData > &d, const PainterBrushShader *sh)
A PainterBrushShader represents a shader for performing a custom brush coloring.
Element of PainterData to hold shader data either reference directly to unpacked data or to reuseable...
PainterCustomBrush(const PainterBrushShader *sh, const PainterDataValue< PainterBrushShaderData > &d=PainterDataValue< PainterBrushShaderData >())