summaryrefslogtreecommitdiff
path: root/rsvg-filter.h
blob: 12038fee66fe49bd7b918371d6b196f8c15f993d (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
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: set sw=4 sts=4 ts=4 expandtab: */
/*
   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"

G_BEGIN_DECLS 

typedef struct  {
    int x0, y0, x1, y1;
} RsvgIRect;

typedef RsvgCoordUnits RsvgFilterUnits;

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

G_GNUC_INTERNAL
cairo_surface_t *rsvg_filter_render (RsvgFilter *self,
                                     cairo_surface_t *source,
                                     RsvgDrawingCtx *context, 
                                     RsvgBbox *dimentions, 
                                     char *channelmap);

G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter	    (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_blend                (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_convolve_matrix      (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_gaussian_blur        (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_offset               (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_merge                (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_merge_node           (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_colour_matrix        (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_component_transfer   (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_node_component_transfer_function      (char channel);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_erode                (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_composite            (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_flood                (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_displacement_map     (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_turbulence           (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_image                (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_diffuse_lighting	    (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_node_light_source	                    (char type);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_specular_lighting    (void);
G_GNUC_INTERNAL
RsvgNode    *rsvg_new_filter_primitive_tile                 (void);

G_END_DECLS

#endif