rsvg-filter.h 3.01 KB
Newer Older
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
/* 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

34
typedef RsvgCoordUnits RsvgFilterUnits;
35 36

struct _RsvgFilter {
37
	RsvgNode super;
38
	int refcnt;
39
	RsvgLength x, y, width, height; 
40 41 42 43
	RsvgFilterUnits filterunits;
	RsvgFilterUnits primitiveunits;
};

Caleb Michael Moore's avatar
Caleb Michael Moore committed
44
GdkPixbuf *
45
rsvg_filter_render (RsvgFilter *self, GdkPixbuf *source, GdkPixbuf *bg, RsvgDrawingCtx *context, RsvgBbox * dimentions, char * channelmap);
46

Caleb Michael Moore's avatar
Caleb Michael Moore committed
47
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
48
rsvg_new_filter (void);
49 50 51 52

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

Caleb Michael Moore's avatar
Caleb Michael Moore committed
53
RsvgNode * 
Caleb Michael Moore's avatar
Caleb Michael Moore committed
54
rsvg_new_filter_primitive_blend (void);
55

Caleb Michael Moore's avatar
Caleb Michael Moore committed
56
RsvgNode * 
Caleb Michael Moore's avatar
Caleb Michael Moore committed
57
rsvg_new_filter_primitive_convolve_matrix (void);
58

Caleb Michael Moore's avatar
Caleb Michael Moore committed
59
RsvgNode * 
Caleb Michael Moore's avatar
Caleb Michael Moore committed
60
rsvg_new_filter_primitive_gaussian_blur (void);
61

Caleb Michael Moore's avatar
Caleb Michael Moore committed
62
RsvgNode * 
Caleb Michael Moore's avatar
Caleb Michael Moore committed
63
rsvg_new_filter_primitive_offset (void);
64

Caleb Michael Moore's avatar
Caleb Michael Moore committed
65
RsvgNode * 
Caleb Michael Moore's avatar
Caleb Michael Moore committed
66
rsvg_new_filter_primitive_merge (void);
67

68 69
RsvgNode * 
rsvg_new_filter_primitive_merge_node (void);
70

Caleb Michael Moore's avatar
Caleb Michael Moore committed
71
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
72
rsvg_new_filter_primitive_colour_matrix (void);
73

Caleb Michael Moore's avatar
Caleb Michael Moore committed
74
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
75
rsvg_new_filter_primitive_component_transfer (void);
76

77 78
RsvgNode *
rsvg_new_node_component_transfer_function (char channel);
79

Caleb Michael Moore's avatar
Caleb Michael Moore committed
80
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
81
rsvg_new_filter_primitive_erode (void);
82

Caleb Michael Moore's avatar
Caleb Michael Moore committed
83
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
84
rsvg_new_filter_primitive_composite (void);
85

Caleb Michael Moore's avatar
Caleb Michael Moore committed
86
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
87
rsvg_new_filter_primitive_flood (void);
88

Caleb Michael Moore's avatar
Caleb Michael Moore committed
89
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
90
rsvg_new_filter_primitive_displacement_map (void);
91

Caleb Michael Moore's avatar
Caleb Michael Moore committed
92
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
93
rsvg_new_filter_primitive_turbulence (void);
94

Caleb Michael Moore's avatar
Caleb Michael Moore committed
95
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
96
rsvg_new_filter_primitive_image (void);
97

Caleb Michael Moore's avatar
Caleb Michael Moore committed
98
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
99
rsvg_new_filter_primitive_diffuse_lighting (void);
100

101 102
RsvgNode *
rsvg_new_filter_primitive_light_source (char type);
103

Caleb Michael Moore's avatar
Caleb Michael Moore committed
104
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
105
rsvg_new_filter_primitive_specular_lighting (void);
106

Caleb Michael Moore's avatar
Caleb Michael Moore committed
107
RsvgNode *
Caleb Michael Moore's avatar
Caleb Michael Moore committed
108
rsvg_new_filter_primitive_tile (void);
109

Caleb Michael Moore's avatar
Caleb Michael Moore committed
110
void
Caleb Michael Moore's avatar
Caleb Michael Moore committed
111 112
rsvg_filter_adobe_blend(gint modenum, GdkPixbuf *in, GdkPixbuf *bg,
						GdkPixbuf *output, RsvgIRect boundarys,
113
						RsvgDrawingCtx * ctx);
114

Caleb Michael Moore's avatar
Caleb Michael Moore committed
115 116 117 118 119 120 121
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);

122 123 124
G_END_DECLS

#endif