1 /*
2 * feTile filter primitive renderer
3 *
4 * Authors:
5 * Felipe CorrĂȘa da Silva Sanches <felipe.sanches@gmail.com>
6 *
7 * Copyright (C) 2007 authors
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
12 #include "display/nr-filter-tile.h"
13 #include "display/nr-filter-units.h"
15 namespace NR {
17 FilterTile::FilterTile()
18 {
19 g_warning("FilterTile::render not implemented.");
20 }
22 FilterPrimitive * FilterTile::create() {
23 return new FilterTile();
24 }
26 FilterTile::~FilterTile()
27 {}
29 int FilterTile::render(FilterSlot &slot, FilterUnits const &/*units*/) {
30 NRPixBlock *in = slot.get(_input);
31 if (!in) {
32 g_warning("Missing source image for feTile (in=%d)", _input);
33 return 1;
34 }
36 NRPixBlock *out = new NRPixBlock;
38 nr_pixblock_setup_fast(out, in->mode,
39 in->area.x0, in->area.y0, in->area.x1, in->area.y1,
40 true);
42 unsigned char *in_data = NR_PIXBLOCK_PX(in);
43 unsigned char *out_data = NR_PIXBLOCK_PX(out);
45 //IMPLEMENT ME!
46 g_warning("Renderer for feTile is not implemented.");
47 (void)in_data;
48 (void)out_data;
50 out->empty = FALSE;
51 slot.set(_output, out);
52 return 0;
53 }
55 void FilterTile::area_enlarge(NRRectL &/*area*/, Matrix const &/*trans*/)
56 {
57 }
59 FilterTraits FilterTile::get_input_traits() {
60 return TRAIT_PARALLER;
61 }
63 } /* namespace NR */
65 /*
66 Local Variables:
67 mode:c++
68 c-file-style:"stroustrup"
69 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
70 indent-tabs-mode:nil
71 fill-column:99
72 End:
73 */
74 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :