xref: /haiku/src/servers/app/drawing/Painter/defines.h (revision 21258e2674226d6aa732321b6f8494841895af5f)
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_alpha_mask_u8.h>
15 #include <agg_rasterizer_outline.h>
16 #include <agg_rasterizer_outline_aa.h>
17 #include <agg_rasterizer_scanline_aa.h>
18 #include <agg_renderer_outline_aa.h>
19 #include <agg_renderer_primitives.h>
20 #include <agg_renderer_scanline.h>
21 #include <agg_scanline_bin.h>
22 #include <agg_scanline_p.h>
23 #include <agg_scanline_u.h>
24 #include <agg_span_allocator.h>
25 #include <agg_span_gradient.h>
26 #include <agg_span_interpolator_linear.h>
27 #include <agg_rendering_buffer.h>
28 #include <agg_trans_affine.h>
29 
30 #include "agg_clipped_alpha_mask.h"
31 #include "agg_rasterizer_scanline_aa_subpix.h"
32 #include "agg_renderer_region.h"
33 #include "agg_renderer_scanline_subpix.h"
34 #include "agg_scanline_p_subpix.h"
35 #include "agg_scanline_p_subpix_avrg_filtering.h"
36 #include "agg_scanline_u_subpix.h"
37 #include "agg_scanline_u_subpix_avrg_filtering.h"
38 
39 #include "GlobalSubpixelSettings.h"
40 #include "drawing_modes/PixelFormat.h"
41 
42 
43 #define ALIASED_DRAWING 0
44 
45 	typedef PixelFormat											pixfmt;
46 	typedef agg::renderer_region<pixfmt>						renderer_base;
47 
48 #if ALIASED_DRAWING
49 	typedef agg::renderer_primitives<renderer_base>				outline_renderer_type;
50 	typedef agg::rasterizer_outline<outline_renderer_type>		outline_rasterizer_type;
51 
52 	typedef agg::scanline_bin									scanline_unpacked_type;
53 	typedef agg::scanline_bin									scanline_packed_type;
54 	typedef agg::renderer_scanline_bin_solid<renderer_base>		renderer_type;
55 #else
56 	typedef agg::renderer_outline_aa<renderer_base>				outline_renderer_type;
57 	typedef agg::rasterizer_outline_aa<outline_renderer_type>	outline_rasterizer_type;
58 
59 	typedef agg::scanline_u8									scanline_unpacked_type;
60 	typedef agg::scanline_p8									scanline_packed_type;
61 #ifdef AVERAGE_BASED_SUBPIXEL_FILTERING
62 	typedef agg::scanline_p8_subpix_avrg_filtering				scanline_packed_subpix_type;
63 	typedef agg::scanline_u8_subpix_avrg_filtering				scanline_unpacked_subpix_type;
64 #else
65 	typedef agg::scanline_p8_subpix								scanline_packed_subpix_type;
66 	typedef agg::scanline_u8_subpix								scanline_unpacked_subpix_type;
67 #endif
68 
69 	typedef agg::scanline_u8_am<agg::clipped_alpha_mask>		scanline_unpacked_masked_type;
70 
71 	typedef agg::renderer_scanline_aa_solid<renderer_base>		renderer_type;
72 #endif // !ALIASED_DRAWING
73 
74 	typedef agg::renderer_scanline_bin_solid<renderer_base>		renderer_bin_type;
75 	typedef agg::renderer_scanline_subpix_solid<renderer_base>  renderer_subpix_type;
76 
77 	typedef agg::rasterizer_scanline_aa<>						rasterizer_type;
78 	typedef agg::rasterizer_scanline_aa_subpix<>				rasterizer_subpix_type;
79 
80 #endif // DEFINES_H
81 
82 
83