Skip to main content

Crate agg_rust

Crate agg_rust 

Source
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:

  1. Vertex Source — generates polygon/polyline vertices
  2. Coordinate Conversion — transforms, strokes, dashes, curves
  3. Scanline Rasterizer — converts vectors to anti-aliased scanlines
  4. Scanline Container — stores coverage data between stages
  5. 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.