2 * Copyright (c) 2007 Ivan Leben
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library in the file COPYING;
16 * if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
35 #define _ITEM_T SHStop
36 #define _ARRAY_T SHStopArray
37 #define _FUNC_T shStopArray
38 #define _ARRAY_DECLARE
39 #include "shArrayBase.h"
48 VGboolean premultiplied;
49 VGColorRampSpreadMode spreadMode;
50 VGTilingMode tilingMode;
51 SHfloat linearGradient[4];
52 SHfloat radialGradient[5];
58 #define SH_GRADIENT_TEX_SIZE 1024
60 void SHPaint_ctor(SHPaint *p);
61 void SHPaint_dtor(SHPaint *p);
63 #define _ITEM_T SHPaint*
64 #define _ARRAY_T SHPaintArray
65 #define _FUNC_T shPaintArray
66 #define _ARRAY_DECLARE
67 #include "shArrayBase.h"
69 void shValidateInputStops(SHPaint *p);
70 void shSetGradientTexGLState(SHPaint *p);
72 int shDrawLinearGradientMesh(SHPaint *p, SHVector2 *min, SHVector2 *max,
73 VGPaintMode mode, GLenum texUnit);
75 int shDrawRadialGradientMesh(SHPaint *p, SHVector2 *min, SHVector2 *max,
76 VGPaintMode mode, GLenum texUnit);
78 int shDrawPatternMesh(SHPaint *p, SHVector2 *min, SHVector2 *max,
79 VGPaintMode mode, GLenum texUnit);
82 #endif /* __SHPAINT_H */