FastUIDraw
painter_fill_shader.hpp
Go to the documentation of this file.
1 /*!
2  * \file painter_fill_shader.hpp
3  * \brief file painter_fill_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_FILL_SHADER_HPP
21 #define FASTUIDRAW_PAINTER_FILL_SHADER_HPP
22 
26 
27 namespace fastuidraw
28 {
29 /*!\addtogroup PainterShaders
30  * @{
31  */
32 
33  /*!
34  * \brief
35  * A PainterFillShader holds the shaders for drawing filled paths.
36  * Anti-aliasing is accomplished by drawing 1-pixel thick rects
37  * about the boundary of the filled path.
38  */
40  {
41  public:
42  /*!
43  * Ctor
44  */
45  PainterFillShader(void);
46 
47  /*!
48  * Copy ctor.
49  */
51 
53 
54  /*!
55  * Assignment operator.
56  */
58  operator=(const PainterFillShader &rhs);
59 
60  /*!
61  * Swap operation
62  * \param obj object with which to swap
63  */
64  void
65  swap(PainterFillShader &obj);
66 
67  /*!
68  * Returns the PainterItemShader to use to draw
69  * the filled path triangles. The expected format
70  * of the attributes is as found in the \ref
71  * PainterAttributeData returned by \ref
72  * FilledPath::Subset::painter_data().
73  */
75  item_shader(void) const;
76 
77  /*!
78  * Set the value returned by item_shader(void) const.
79  * \param sh value to use
80  */
83 
84  /*!
85  * Returns the PainterItemShader to use to draw the
86  * anti-alias fuzz via the deferred coverage buffer.
87  * This shader will draw the aa-fuzz in two passes:
88  * the first pass draws the coverage as computed by
89  * a fragment shader to the deferred coverage buffer
90  * (via the PainterItemShader::coverage_shader())
91  * and the 2nd pass reads from the deferred coverage
92  * buffer to emit the alpha value.
93  */
95  aa_fuzz_shader(void) const;
96 
97  /*!
98  * Set the value returned by aa_fuzz_shader(void) const.
99  * \param sh value to use
100  */
103 
104  private:
105  void *m_d;
106  };
107 
108 /*! @} */
109 }
110 
111 #endif
all classes and functions of FastUIDraw are in the namespace fastuidraw.
Definition: colorstop.hpp:28
A PainterFillShader holds the shaders for drawing filled paths. Anti-aliasing is accomplished by draw...
A wrapper over a pointer to implement reference counting.
PainterFillShader & operator=(const PainterFillShader &rhs)
const reference_counted_ptr< PainterItemShader > & item_shader(void) const
file painter_item_shader.hpp
file painter_enums.hpp
file painter_draw.hpp
void swap(PainterFillShader &obj)
const reference_counted_ptr< PainterItemShader > & aa_fuzz_shader(void) const