source: trunk/third/librsvg/art_render_gradient.h @ 17277

Revision 17277, 2.3 KB checked in by amb, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17276, which included commits to RCS files with non-trunk default branches.
Line 
1/* This file is adapted from art_render_gradient.h in Libart version 2.3.0 */
2
3#include <libart_lgpl/libart-features.h>
4
5#if LIBART_MAJOR_VERSION == 2 && LIBART_MINOR_VERSION < 3
6
7/*
8 * art_render_gradient.h: Gradient image source for modular rendering.
9 *
10 * Libart_LGPL - library of basic graphic primitives
11 * Copyright (C) 2000 Raph Levien
12 *
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
17 *
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 * Library General Public License for more details.
22 *
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the
25 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26 * Boston, MA 02111-1307, USA.
27 *
28 * Authors: Raph Levien <raph@acm.org>
29 *          Alexander Larsson <alla@lysator.liu.se>
30 */
31
32#ifndef __ART_RENDER_GRADIENT_H__
33#define __ART_RENDER_GRADIENT_H__
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
39typedef struct _ArtGradientLinear ArtGradientLinear;
40typedef struct _ArtGradientRadial ArtGradientRadial;
41typedef struct _ArtGradientStop ArtGradientStop;
42
43typedef enum {
44  ART_GRADIENT_PAD,
45  ART_GRADIENT_REFLECT,
46  ART_GRADIENT_REPEAT
47} ArtGradientSpread;
48
49struct _ArtGradientLinear {
50  double a;
51  double b;
52  double c;
53  ArtGradientSpread spread;
54  int n_stops;
55  ArtGradientStop *stops;
56};
57
58struct _ArtGradientRadial {
59  double affine[6]; /* transforms user coordinates to unit circle */
60  double fx, fy;    /* focal point in unit circle coords */
61  int n_stops;
62  ArtGradientStop *stops;
63};
64
65struct _ArtGradientStop {
66  double offset;
67  ArtPixMaxDepth color[ART_MAX_CHAN + 1];
68};
69
70void
71art_render_gradient_linear (ArtRender *render,
72                            const ArtGradientLinear *gradient,
73                            ArtFilterLevel level);
74
75void
76art_render_gradient_radial (ArtRender *render,
77                            const ArtGradientRadial *gradient,
78                            ArtFilterLevel level);
79
80#ifdef __cplusplus
81}
82#endif /* __cplusplus */
83
84#endif /* __ART_RENDER_GRADIENT_H__ */
85
86#else
87
88#include <libart_lgpl/art_render_gradient.h>
89
90#endif
Note: See TracBrowser for help on using the repository browser.