summaryrefslogtreecommitdiff
path: root/rsvg-filter.h
blob: ac1cdfdc41c573130a45e0c4f2666761d0e281e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* vim: set sw=4: -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
   rsvg-filter.h : Provides filters

   Copyright (C) 2004 Caleb Moore

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with this program; if not, write to the
   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.

   Author: Caleb Moore <calebmm@tpg.com.au>
*/

#ifndef RSVG_FILTER_H
#define RSVG_FILTER_H

#include "rsvg.h"
#include "rsvg-defs.h"
#include <libxml/SAX.h>

G_BEGIN_DECLS

typedef RsvgCoordUnits RsvgFilterUnits;

struct _RsvgFilter {
	RsvgNode super;
	int refcnt;
	RsvgLength x, y, width, height; 
	RsvgFilterUnits filterunits;
	RsvgFilterUnits primitiveunits;
};

GdkPixbuf *
rsvg_filter_render (RsvgFilter *self, GdkPixbuf *source, GdkPixbuf *bg, RsvgDrawingCtx *context, RsvgBbox * dimentions, char * channelmap);

RsvgNode *
rsvg_new_filter (void);

RsvgFilter *
rsvg_filter_parse (const RsvgDefs *defs, const char *str);

RsvgNode * 
rsvg_new_filter_primitive_blend (void);

RsvgNode * 
rsvg_new_filter_primitive_convolve_matrix (void);

RsvgNode * 
rsvg_new_filter_primitive_gaussian_blur (void);

RsvgNode * 
rsvg_new_filter_primitive_offset (void);

RsvgNode * 
rsvg_new_filter_primitive_merge (void);

RsvgNode * 
rsvg_new_filter_primitive_merge_node (void);

RsvgNode *
rsvg_new_filter_primitive_colour_matrix (void);

RsvgNode *
rsvg_new_filter_primitive_component_transfer (void);

RsvgNode *
rsvg_new_node_component_transfer_function (char channel);

RsvgNode *
rsvg_new_filter_primitive_erode (void);

RsvgNode *
rsvg_new_filter_primitive_composite (void);

RsvgNode *
rsvg_new_filter_primitive_flood (void);

RsvgNode *
rsvg_new_filter_primitive_displacement_map (void);

RsvgNode *
rsvg_new_filter_primitive_turbulence (void);

RsvgNode *
rsvg_new_filter_primitive_image (void);

RsvgNode *
rsvg_new_filter_primitive_diffuse_lighting (void);

RsvgNode *
rsvg_new_filter_primitive_light_source (char type);

RsvgNode *
rsvg_new_filter_primitive_specular_lighting (void);

RsvgNode *
rsvg_new_filter_primitive_tile (void);

void
rsvg_filter_adobe_blend(gint modenum, GdkPixbuf *in, GdkPixbuf *bg,
						GdkPixbuf *output, RsvgIRect boundarys,
						RsvgDrawingCtx * ctx);

void rsvg_alpha_blt (GdkPixbuf * src, gint srcx, gint srcy, 
					 gint srcwidth, gint srcheight, 
					 GdkPixbuf * dst, gint dstx, gint dsty);

void rsvg_art_affine_image(const GdkPixbuf *img, GdkPixbuf *intermediate, 
						   double * affine, double w, double h);

G_END_DECLS

#endif