Expand description
§agg-rust
Pure Rust port of Anti-Grain Geometry (AGG) 2.6 — a high quality 2D vector graphics rendering library originally written in C++ by Maxim Shemanarev.
AGG produces pixel images in memory from vectorial data. It features:
- Anti-aliased rendering with subpixel accuracy
- Affine and perspective transformations
- Multiple pixel format renderers (RGBA, RGB, grayscale, packed)
- Gradient and image pattern fills
- Stroke, dash, and contour generation
- Gouraud shading
- Image filtering and resampling
- Alpha masking
- Compositing modes (SVG 1.2 compatible)
- Built-in vector and raster fonts
§Architecture
AGG uses a five-stage rendering pipeline:
- Vertex Source — generates polygon/polyline vertices
- Coordinate Conversion — transforms, strokes, dashes, curves
- Scanline Rasterizer — converts vectors to anti-aliased scanlines
- Scanline Container — stores coverage data between stages
- Renderer — blends pixels into the output buffer
Modules§
- alpha_
mask_ u8 - Alpha masking with clipping support.
- arc
- Arc vertex generator.
- array
- Container utilities and vertex sequence types.
- arrowhead
- Arrowhead / arrowtail vertex generator.
- basics
- Foundation types, constants, and path command utilities.
- bezier_
arc - Bezier arc generator.
- blur
- Stack blur and recursive blur implementations.
- bounding_
rect - Bounding rectangle calculation.
- bspline
- Bicubic spline interpolation.
- clip_
liang_ barsky - Liang-Barsky line clipping algorithm.
- color
- Color types and operations.
- comp_op
- SVG compositing operations and compositing pixel format.
- conv_
adaptor_ vcgen - Generic adapter connecting a vertex source to a vertex generator.
- conv_
adaptor_ vpgen - Generic vertex processor generator adaptor.
- conv_
contour - Contour converter for vertex sources.
- conv_
curve - Curve flattening converter.
- conv_
dash - Dash converter for vertex sources.
- conv_
marker - Marker placement converter.
- conv_
segmentator - Convenience line-segment subdivider.
- conv_
smooth_ poly1 - Smooth polygon converter.
- conv_
stroke - Stroke converter for vertex sources.
- conv_
transform - Transform converter for vertex sources.
- ctrl
- Interactive UI controls rendered via AGG’s rendering pipeline.
- curves
- Bezier curve generators (quadratic and cubic).
- dda_
line - DDA (Digital Differential Analyzer) line interpolation algorithms.
- ellipse
- Ellipse vertex generator.
- ellipse_
bresenham - Bresenham ellipse interpolator.
- embedded_
raster_ fonts - Embedded raster font data.
- gamma
- Gamma correction functions and lookup tables.
- glyph_
raster_ bin - Binary raster glyph generator.
- gradient_
lut - Gradient color lookup table.
- gsv_
text - Geometric stroke vector text.
- image_
accessors - Image pixel access with boundary handling modes.
- image_
filters - Image transformation filters and lookup table.
- line_
aa_ basics - Anti-aliased line rendering basics.
- math
- Geometric math utilities.
- math_
stroke - Stroke math — cap, join, and miter calculations for stroked paths.
- path_
storage - Path storage — the primary vertex container for AGG.
- pattern_
filters_ rgba - Pattern filters for RGBA pixel formats.
- pixfmt_
gray - Grayscale pixel format with alpha blending.
- pixfmt_
lcd - LCD subpixel pixel format for RGBA32 buffers.
- pixfmt_
rgb - RGB pixel format with alpha blending (no alpha channel in buffer).
- pixfmt_
rgba - RGBA pixel format with alpha blending.
- pixfmt_
transposer - Pixel format transposer.
- rasterizer_
cells_ aa - Anti-aliased cell rasterizer engine.
- rasterizer_
compound_ aa - Compound AA rasterizer with per-edge style indices.
- rasterizer_
outline - Outline rasterizer.
- rasterizer_
outline_ aa - Anti-aliased outline rasterizer.
- rasterizer_
scanline_ aa - High-level polygon scanline rasterizer with anti-aliasing.
- rasterizer_
sl_ clip - Rasterizer scanline clipping policies.
- renderer_
base - Base renderer with clipping.
- renderer_
mclip - Multi-clip renderer.
- renderer_
outline_ aa - Anti-aliased outline renderer.
- renderer_
outline_ image - Image-patterned outline renderer.
- renderer_
primitives - Basic shape primitives renderer.
- renderer_
raster_ text - Raster text renderer for embedded bitmap fonts.
- renderer_
scanline - Scanline rendering functions.
- rendering_
buffer - Rendering buffer — row-oriented access to pixel data.
- rounded_
rect - Rounded rectangle vertex generator.
- scanline_
bin - Binary scanline container (ScanlineBin).
- scanline_
boolean_ algebra - Scanline boolean algebra.
- scanline_
p - Packed scanline container (ScanlineP8).
- scanline_
storage_ aa - Anti-aliased scanline storage.
- scanline_
storage_ bin - Binary (non-AA) scanline storage.
- scanline_
u - Unpacked scanline container (ScanlineU8).
- simul_
eq - Solving simultaneous equations via Gaussian elimination.
- span_
allocator - Span color buffer allocator.
- span_
converter - Composable span pipeline.
- span_
gouraud - Gouraud shading base — triangle with per-vertex colors.
- span_
gouraud_ rgba - RGBA Gouraud shading span generator.
- span_
gradient - Gradient span generator and gradient functions.
- span_
image_ filter - Base image filter span generators.
- span_
image_ filter_ rgba - RGBA image transformation span generators.
- span_
interpolator_ adaptor - Span interpolator adaptor with distortion.
- span_
interpolator_ linear - Linear span interpolator.
- span_
interpolator_ persp - Perspective span interpolators.
- span_
interpolator_ trans - Per-pixel transform span interpolator.
- span_
pattern_ rgba - RGBA span pattern generator.
- span_
solid - Solid color span generator.
- span_
subdiv_ adaptor - Span subdivision adaptor.
- trans_
affine - Affine transformation matrix.
- trans_
bilinear - Bilinear 2D transformation.
- trans_
double_ path - Double-path coordinate transformation.
- trans_
perspective - Perspective 2D transformations.
- trans_
polar - Polar coordinate transformation.
- trans_
single_ path - Single-path coordinate transformation.
- trans_
viewport - Viewport transformation.
- trans_
warp_ magnifier - Warp magnifier transformation.
- vcgen_
contour - Contour vertex generator.
- vcgen_
dash - Dash vertex generator.
- vcgen_
smooth_ poly1 - Smooth polygon vertex generator.
- vcgen_
stroke - Stroke vertex generator.
- vpgen_
segmentator - Vertex processor generator: line segment subdivider.