Description ​
The GR32_Rasterizers unit defines the rasterization infrastructure in Graphics32. Rasterizers bridge spatial samplers (TCustomSampler) and pixel buffers (TCustomBitmap32), evaluating surface samples across coordinates and writing formatted pixel colors to the target bitmap.
Key components in GR32_Rasterizers include:
- Base Class:
TRasterizerprovides abstract sampling loop mechanics, blend mode handling, and thread-safe persistent property management. - Regular Rasterization:
TRegularRasterizerevaluates samples sequentially scanline by scanline. - Fractal / Swizzling Rasterization:
TSwizzlingRasterizervisits pixel coordinates along space-filling fractal curves to optimize CPU cache locality. - Progressive Subsampling:
TProgressiveRasterizerperforms multi-step subsampling for fast interactive coarse previews followed by refinement. - Tesseral & Contour Sampling:
TTesseralRasterizerapplies recursive divide-and-conquer block decomposition, whileTContourRasterizertraces pixel contours by color intensity difference. - Draft Rendering:
TDraftRasterizerrenders coarse pixel blocks for low-cost live preview. - Multi-Threaded Rasterization: Parallel scanline algorithms using system thread pools or worker threads (
TMultithreadedRegularRasterizer,TParallelRegularRasterizer,TTaskRegularRasterizer,TThreadRegularRasterizer). - Combination Infrastructure:
TCombineInfoand helper routines for configuring drawing mode, master alpha, and pixel combination callbacks during sampling.