author | Jose Thachil<jose.thachil@cell-telecom.com> |
Wed, 12 May 2010 13:05:33 +0100 | |
branch | EGL_MERGE |
changeset 59 | 0fb7b31791c3 |
parent 57 | 2bf8a359aa2f |
permissions | -rw-r--r-- |
57
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
1 |
#ifndef __RIPIXELPIPE_H |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
2 |
#define __RIPIXELPIPE_H |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
3 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
4 |
/*------------------------------------------------------------------------ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
5 |
* |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
6 |
* OpenVG 1.1 Reference Implementation |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
7 |
* ----------------------------------- |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
8 |
* |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
9 |
* Copyright (c) 2007 The Khronos Group Inc. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
10 |
* |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
11 |
* Permission is hereby granted, free of charge, to any person obtaining a |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
12 |
* copy of this software and /or associated documentation files |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
13 |
* (the "Materials "), to deal in the Materials without restriction, |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
14 |
* including without limitation the rights to use, copy, modify, merge, |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
15 |
* publish, distribute, sublicense, and/or sell copies of the Materials, |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
16 |
* and to permit persons to whom the Materials are furnished to do so, |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
17 |
* subject to the following conditions: |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
18 |
* |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
19 |
* The above copyright notice and this permission notice shall be included |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
20 |
* in all copies or substantial portions of the Materials. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
21 |
* |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
22 |
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
23 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
24 |
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
25 |
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
26 |
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
27 |
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
28 |
* THE USE OR OTHER DEALINGS IN THE MATERIALS. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
29 |
* |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
30 |
*//** |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
31 |
* \file |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
32 |
* \brief Paint and PixelPipe classes. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
33 |
* \note |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
34 |
*//*-------------------------------------------------------------------*/ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
35 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
36 |
#ifndef __RIMATH_H |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
37 |
#include "riMath.h" |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
38 |
#endif |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
39 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
40 |
#ifndef __RIIMAGE_H |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
41 |
#include "riImage.h" |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
42 |
#endif |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
43 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
44 |
//======================================================================= |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
45 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
46 |
namespace OpenVGRI |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
47 |
{ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
48 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
49 |
/*-------------------------------------------------------------------*//*! |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
50 |
* \brief Storage and operations for VGPaint. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
51 |
* \param |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
52 |
* \return |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
53 |
* \note |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
54 |
*//*-------------------------------------------------------------------*/ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
55 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
56 |
class Paint |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
57 |
{ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
58 |
public: |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
59 |
Paint(); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
60 |
~Paint(); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
61 |
void addReference() { m_referenceCount++; } |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
62 |
int removeReference() { m_referenceCount--; RI_ASSERT(m_referenceCount >= 0); return m_referenceCount; } |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
63 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
64 |
struct GradientStop |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
65 |
{ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
66 |
GradientStop() : offset(0.0f), color(0.0f, 0.0f, 0.0f, 0.0f, Color::sRGBA) {} |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
67 |
RIfloat offset; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
68 |
Color color; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
69 |
}; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
70 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
71 |
VGPaintType m_paintType; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
72 |
Color m_paintColor; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
73 |
Color m_inputPaintColor; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
74 |
VGColorRampSpreadMode m_colorRampSpreadMode; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
75 |
Array<GradientStop> m_colorRampStops; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
76 |
Array<GradientStop> m_inputColorRampStops; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
77 |
VGboolean m_colorRampPremultiplied; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
78 |
Vector2 m_inputLinearGradientPoint0; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
79 |
Vector2 m_inputLinearGradientPoint1; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
80 |
Vector2 m_inputRadialGradientCenter; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
81 |
Vector2 m_inputRadialGradientFocalPoint; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
82 |
RIfloat m_inputRadialGradientRadius; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
83 |
Vector2 m_linearGradientPoint0; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
84 |
Vector2 m_linearGradientPoint1; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
85 |
Vector2 m_radialGradientCenter; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
86 |
Vector2 m_radialGradientFocalPoint; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
87 |
RIfloat m_radialGradientRadius; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
88 |
VGTilingMode m_patternTilingMode; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
89 |
Image* m_pattern; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
90 |
private: |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
91 |
Paint(const Paint&); //!< Not allowed. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
92 |
const Paint& operator=(const Paint&); //!< Not allowed. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
93 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
94 |
int m_referenceCount; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
95 |
}; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
96 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
97 |
/*-------------------------------------------------------------------*//*! |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
98 |
* \brief Encapsulates all information needed for painting a pixel. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
99 |
* \param |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
100 |
* \return |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
101 |
* \note |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
102 |
*//*-------------------------------------------------------------------*/ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
103 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
104 |
class PixelPipe |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
105 |
{ |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
106 |
public: |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
107 |
PixelPipe(); //throws bad_alloc |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
108 |
~PixelPipe(); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
109 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
110 |
void pixelPipe(int x, int y, RIfloat coverage, unsigned int sampleMask) const; //rasterizer calls this function for each pixel |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
111 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
112 |
void setDrawable(Drawable* drawable); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
113 |
void setBlendMode(VGBlendMode blendMode); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
114 |
void setMask(bool masking); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
115 |
void setImage(Image* image, VGImageMode imageMode); //image = NULL disables drawImage functionality |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
116 |
void setSurfaceToPaintMatrix(const Matrix3x3& surfaceToPaintMatrix); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
117 |
void setSurfaceToImageMatrix(const Matrix3x3& surfaceToImageMatrix); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
118 |
void setImageQuality(VGImageQuality imageQuality); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
119 |
void setTileFillColor(const Color& c); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
120 |
void setPaint(const Paint* paint); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
121 |
void setColorTransform(bool enable, RIfloat values[8]); |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
122 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
123 |
private: |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
124 |
void linearGradient(RIfloat& g, RIfloat& rho, RIfloat x, RIfloat y) const; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
125 |
void radialGradient(RIfloat& g, RIfloat& rho, RIfloat x, RIfloat y) const; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
126 |
Color integrateColorRamp(RIfloat gmin, RIfloat gmax) const; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
127 |
Color colorRamp(RIfloat gradient, RIfloat rho) const; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
128 |
Color blend(const Color& s, RIfloat ar, RIfloat ag, RIfloat ab, const Color& d, VGBlendMode blendMode) const; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
129 |
void colorTransform(Color& c) const; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
130 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
131 |
PixelPipe(const PixelPipe&); //!< Not allowed. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
132 |
const PixelPipe& operator=(const PixelPipe&); //!< Not allowed. |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
133 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
134 |
Drawable* m_drawable; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
135 |
bool m_masking; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
136 |
Image* m_image; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
137 |
const Paint* m_paint; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
138 |
Paint m_defaultPaint; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
139 |
VGBlendMode m_blendMode; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
140 |
VGImageMode m_imageMode; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
141 |
VGImageQuality m_imageQuality; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
142 |
Color m_tileFillColor; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
143 |
bool m_colorTransform; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
144 |
RIfloat m_colorTransformValues[8]; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
145 |
Matrix3x3 m_surfaceToPaintMatrix; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
146 |
Matrix3x3 m_surfaceToImageMatrix; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
147 |
}; |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
148 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
149 |
//======================================================================= |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
150 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
151 |
} //namespace OpenVGRI |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
152 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
153 |
//======================================================================= |
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
154 |
|
2bf8a359aa2f
Create EGL 1.4 implementation by merging eglrefimpl and EGL from sfopenvg
Jose Thachil<jose.thachil@cell-telecom.com>
parents:
diff
changeset
|
155 |
#endif /* __RIPIXELPIPE_H */ |