source: trunk/third/librsvg/rsvg-paint-server.h @ 18352

Revision 18352, 1.6 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18351, which included commits to RCS files with non-trunk default branches.
Line 
1#include <glib/gtypes.h>
2#include <libart_lgpl/art_render_gradient.h>
3#include "rsvg-defs.h"
4
5typedef struct _RsvgGradientStop RsvgGradientStop;
6typedef struct _RsvgGradientStops RsvgGradientStops;
7typedef struct _RsvgLinearGradient RsvgLinearGradient;
8typedef struct _RsvgRadialGradient RsvgRadialGradient;
9
10typedef struct _RsvgPaintServer RsvgPaintServer;
11
12typedef struct _RsvgPSCtx RsvgPSCtx;
13
14struct _RsvgPSCtx {
15  int dummy;
16/* todo: we need to take in some context information, including:
17
18   1. The global affine transformation.
19
20   2. User coordinates at time of reference (to implement
21   gradientUnits = "userSpaceOnUse").
22
23   3. Object bounding box (to implement gradientUnits =
24   "objectBoundingBox").
25
26   Maybe signal for lazy evaluation of object bbox.
27*/
28};
29
30struct _RsvgGradientStop {
31  double offset;
32  guint32 rgba;
33};
34
35struct _RsvgGradientStops {
36  int n_stop;
37  RsvgGradientStop *stop;
38};
39
40struct _RsvgLinearGradient {
41  RsvgDefVal super;
42  double affine[6]; /* user space to actual at time of gradient def */
43  double x1, y1;
44  double x2, y2;
45  ArtGradientSpread spread;
46  RsvgGradientStops *stops;
47};
48
49struct _RsvgRadialGradient {
50  RsvgDefVal super;
51  double affine[6]; /* user space to actual at time of gradient def */
52  double cx, cy;
53  double r;
54  double fx, fy;
55  RsvgGradientStops *stops;
56};
57
58/* Create a new paint server based on a specification string. */
59RsvgPaintServer *
60rsvg_paint_server_parse (const RsvgDefs *defs, const char *str);
61
62void
63rsvg_render_paint_server (ArtRender *ar, RsvgPaintServer *ps,
64                          const RsvgPSCtx *ctx);
65
66void
67rsvg_paint_server_ref (RsvgPaintServer *ps);
68
69void
70rsvg_paint_server_unref (RsvgPaintServer *ps);
71
Note: See TracBrowser for help on using the repository browser.