1 /* remove_font_transform.c
3 Part of the swftools package.
5 Copyright (c) 2010 Matthias Kramm <kramm@quiss.org>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
23 #include "../gfxfilter.h"
24 #include "../gfxtools.h"
28 typedef struct _internal {
31 static void pass1_drawchar(gfxfilter_t*f, gfxfont_t*font, int glyphnr, gfxcolor_t*color, gfxmatrix_t*matrix, gfxdevice_t*out)
33 internal_t*i = (internal_t*)f->internal;
34 out->drawchar(out, font, glyphnr, color, matrix);
37 static void pass2_drawchar(gfxfilter_t*f, gfxfont_t*font, int glyphnr, gfxcolor_t*color, gfxmatrix_t*matrix, gfxdevice_t*out)
39 internal_t*i = (internal_t*)f->internal;
40 out->drawchar(out, font, glyphnr, color, matrix);
43 void gfxtwopassfilter_remove_font_transforms_init(gfxtwopassfilter_t*f)
45 internal_t*i = (internal_t*)rfx_calloc(sizeof(internal_t));
46 memset(f, 0, sizeof(gfxtwopassfilter_t));
47 f->pass1.name = "remove font transforms pass 1";
48 f->pass1.drawchar = pass1_drawchar;
49 f->pass1.internal = i;
51 f->pass2.name = "remove font transforms pass 2";
52 f->pass2.drawchar = pass2_drawchar;
53 f->pass2.internal = i;