xref: /haiku/src/servers/app/drawing/Painter/defines.h (revision 7749d0bb0c358a3279b1b9cc76d8376e900130a5)
1 /*
2  * Copyright 2005-2006, Stephan Aßmus <superstippi@gmx.de>.
3  * Copyright 2008, Andrej Spielmann <andrej.spielmann@seh.ox.ac.uk>.
4  * All rights reserved. Distributed under the terms of the MIT License.
5  *
6  * global definitions for the Painter frame work, mainly types for the
7  * AGG pipelines
8  *
9  */
10 
11 #ifndef DEFINES_H
12 #define DEFINES_H
13 
14 #include <agg_rasterizer_outline.h>
15 #include <agg_rasterizer_outline_aa.h>
16 #include <agg_rasterizer_scanline_aa.h>
17 #include <agg_renderer_outline_aa.h>
18 #include <agg_renderer_primitives.h>
19 #include <agg_renderer_scanline.h>
20 #include <agg_scanline_bin.h>
21 #include <agg_scanline_p.h>
22 #include <agg_scanline_u.h>
23 #include <agg_span_allocator.h>
24 #include <agg_span_gradient.h>
25 #include <agg_span_interpolator_linear.h>
26 #include <agg_rendering_buffer.h>
27 
28 #include "agg_rasterizer_scanline_aa_subpix.h"
29 #include "agg_renderer_region.h"
30 #include "agg_renderer_scanline_subpix.h"
31 #include "agg_scanline_p_subpix.h"
32 #include "agg_scanline_p_subpix_avrg_filtering.h"
33 #include "agg_scanline_u_subpix.h"
34 #include "agg_scanline_u_subpix_avrg_filtering.h"
35 
36 #include "GlobalSubpixelSettings.h"
37 #include "PixelFormat.h"
38 
39 
40 #define ALIASED_DRAWING 0
41 
42 	typedef PixelFormat											pixfmt;
43 	typedef agg::renderer_region<pixfmt>						renderer_base;
44 
45 #if ALIASED_DRAWING
46 	typedef agg::renderer_primitives<renderer_base>				outline_renderer_type;
47 	typedef agg::rasterizer_outline<outline_renderer_type>		outline_rasterizer_type;
48 
49 	typedef agg::scanline_bin									scanline_unpacked_type;
50 	typedef agg::scanline_bin									scanline_packed_type;
51 	typedef agg::renderer_scanline_bin_solid<renderer_base>		renderer_type;
52 #else
53 	typedef agg::renderer_outline_aa<renderer_base>				outline_renderer_type;
54 	typedef agg::rasterizer_outline_aa<outline_renderer_type>	outline_rasterizer_type;
55 
56 	typedef agg::scanline_u8									scanline_unpacked_type;
57 	typedef agg::scanline_p8									scanline_packed_type;
58 #ifdef AVERAGE_BASED_SUBPIXEL_FILTERING
59 	typedef agg::scanline_p8_subpix_avrg_filtering				scanline_packed_subpix_type;
60 	typedef agg::scanline_u8_subpix_avrg_filtering				scanline_unpacked_subpix_type;
61 #else
62 	typedef agg::scanline_p8_subpix								scanline_packed_subpix_type;
63 	typedef agg::scanline_u8_subpix								scanline_unpacked_subpix_type;
64 #endif
65 	typedef agg::renderer_scanline_aa_solid<renderer_base>		renderer_type;
66 #endif // !ALIASED_DRAWING
67 
68 	typedef agg::renderer_scanline_bin_solid<renderer_base>		renderer_bin_type;
69 	typedef agg::renderer_scanline_subpix_solid<renderer_base>  renderer_subpix_type;
70 
71 	typedef agg::rasterizer_scanline_aa<>						rasterizer_type;
72 	typedef agg::rasterizer_scanline_aa_subpix<>				rasterizer_subpix_type;
73 
74 #endif // DEFINES_H
75 
76 
77