Skip to main content

agg_rust/
lib.rs

1//! # agg-rust
2//!
3//! Pure Rust port of Anti-Grain Geometry (AGG) 2.6 — a high quality 2D vector
4//! graphics rendering library originally written in C++ by Maxim Shemanarev.
5//!
6//! AGG produces pixel images in memory from vectorial data. It features:
7//!
8//! - Anti-aliased rendering with subpixel accuracy
9//! - Affine and perspective transformations
10//! - Multiple pixel format renderers (RGBA, RGB, grayscale, packed)
11//! - Gradient and image pattern fills
12//! - Stroke, dash, and contour generation
13//! - Gouraud shading
14//! - Image filtering and resampling
15//! - Alpha masking
16//! - Compositing modes (SVG 1.2 compatible)
17//! - Built-in vector and raster fonts
18//!
19//! ## Architecture
20//!
21//! AGG uses a five-stage rendering pipeline:
22//!
23//! 1. **Vertex Source** — generates polygon/polyline vertices
24//! 2. **Coordinate Conversion** — transforms, strokes, dashes, curves
25//! 3. **Scanline Rasterizer** — converts vectors to anti-aliased scanlines
26//! 4. **Scanline Container** — stores coverage data between stages
27//! 5. **Renderer** — blends pixels into the output buffer
28
29// Phase 1: Foundation Types & Math
30pub mod array;
31pub mod basics;
32pub mod color;
33pub mod gamma;
34pub mod math;
35
36// Phase 2: Memory & Geometry Primitives
37pub mod arc;
38pub mod arrowhead;
39pub mod bezier_arc;
40pub mod bounding_rect;
41pub mod bspline;
42pub mod clip_liang_barsky;
43pub mod curves;
44pub mod dda_line;
45pub mod ellipse;
46pub mod math_stroke;
47pub mod path_storage;
48pub mod rendering_buffer;
49pub mod rounded_rect;
50pub mod simul_eq;
51pub mod trans_affine;
52
53// Phase 3: Scanline Rasterizer
54pub mod rasterizer_cells_aa;
55pub mod rasterizer_scanline_aa;
56pub mod rasterizer_sl_clip;
57pub mod scanline_bin;
58pub mod scanline_p;
59pub mod scanline_u;
60
61// Phase 3C: Pixel Formats & Renderers
62pub mod pixfmt_gray;
63pub mod pixfmt_lcd;
64pub mod pixfmt_rgb;
65pub mod pixfmt_rgba;
66pub mod renderer_base;
67pub mod renderer_scanline;
68
69// Phase 4: Converter Pipeline
70pub mod conv_adaptor_vcgen;
71pub mod conv_contour;
72pub mod conv_curve;
73pub mod conv_dash;
74pub mod conv_stroke;
75pub mod conv_transform;
76pub mod vcgen_contour;
77pub mod vcgen_dash;
78pub mod vcgen_stroke;
79
80// Phase 5: Span Generators & Gradients
81pub mod gradient_lut;
82pub mod span_allocator;
83pub mod span_gouraud;
84pub mod span_gouraud_rgba;
85pub mod span_gradient;
86pub mod span_interpolator_linear;
87pub mod span_solid;
88
89// Phase 6: Transforms, Image Filters, Text & Alpha Masking
90pub mod alpha_mask_u8;
91pub mod conv_marker;
92pub mod gsv_text;
93pub mod image_accessors;
94pub mod image_filters;
95pub mod span_image_filter;
96pub mod trans_bilinear;
97pub mod trans_perspective;
98
99// Phase 7: Image Span Filters & Demo Infrastructure
100pub mod ellipse_bresenham;
101pub mod rasterizer_outline;
102pub mod renderer_primitives;
103pub mod span_converter;
104pub mod span_image_filter_rgba;
105pub mod span_interpolator_trans;
106pub mod span_subdiv_adaptor;
107pub mod trans_viewport;
108
109// Phase 8: Controls (interactive UI widgets rendered via AGG pipeline)
110pub mod ctrl;
111
112// Phase 9: Quick Transforms & Segmentator
113pub mod conv_adaptor_vpgen;
114pub mod conv_segmentator;
115pub mod span_interpolator_adaptor;
116pub mod trans_polar;
117pub mod trans_single_path;
118pub mod trans_warp_magnifier;
119pub mod vpgen_segmentator;
120
121// Phase 10: Patterns & Perspective Interpolator
122pub mod pattern_filters_rgba;
123pub mod span_interpolator_persp;
124pub mod span_pattern_rgba;
125
126// Phase 11: Blur & Multi-Clip
127pub mod blur;
128pub mod pixfmt_transposer;
129pub mod renderer_mclip;
130
131// Phase 12: Scanline Boolean Algebra
132pub mod scanline_boolean_algebra;
133pub mod scanline_storage_aa;
134pub mod scanline_storage_bin;
135
136// Phase 13: Outline AA Rasterizer
137pub mod line_aa_basics;
138pub mod rasterizer_outline_aa;
139pub mod renderer_outline_aa;
140pub mod renderer_outline_image;
141
142// Phase 14: Compositing & Compound Rasterizer
143pub mod comp_op;
144pub mod rasterizer_compound_aa;
145
146// Phase 15: Raster Fonts
147pub mod embedded_raster_fonts;
148pub mod glyph_raster_bin;
149pub mod renderer_raster_text;
150
151// Phase 15b: Double-path transformer
152pub mod trans_double_path;
153
154// Phase 16: TrueType Font Engine (optional, requires `font` feature)
155#[cfg(feature = "font")]
156pub mod font_engine;
157#[cfg(feature = "font")]
158pub mod font_cache;