Skip to content

Example Projects

Graphics32 comes with an extensive collection of ready-to-run example applications located in the Examples directory of the repository.
These projects demonstrate key graphics algorithms, rendering techniques, user interaction patterns, and performance optimizations available in the library.

Each example includes complete Delphi (.dpr) and, in most cases also, Lazarus/FPC (.lpi) project files, allowing you to compile, run, and inspect the implementation details directly.

Available Examples

ExampleDemonstratesScreenshot
BlendVsMergeConcept: Pixel blending vs pixel merging
Techniques: Alpha compositing, direct pixel arithmetic
API: MergeReg, BlendReg, TImage32, TBitmap32
BlendVsMerge
PixelCombineConcept: Porter-Duff alpha composition modes
Techniques: Interactive layer blending, custom pixel combination callbacks
API: GR32.Blend.Modes.PhotoShop, GR32.Blend.Modes.PorterDuff, TImgView32, TBitmapLayer, TRubberbandLayer, BlendLine, CombineMode, ExecDrawLayers, Graphics32BlendService
PixelCombine
TextureBlendConcept: Color algebra composition modes (Multiply, Screen, Overlay, Add, Subtract)
Techniques: Multi-texture composition and custom blend modes
API: TImage32, BlendRegEx, Color Algebra, BlendTransfer
TextureBlend
AntiAliasingConcept: High-quality antialiased line and polygon rendering
Techniques: Subpixel accuracy, vector rasterization, polyline and polygon antialiasing
API: TPaintBox32, TPolygonRenderer32VPR, PolygonFS, PolyPolygonFS, TLinearGradientPolygonFiller, BuildPolyLine, Circle
AntiAliasing
ArrowHeadConcept: Vector path end caps and polygon fillers
Techniques: Bezier path decoration and custom line arrowheads
API: TFlattenedPath, CurveTo, TArrowHeadAbstract, TLinearGradientPolygonFiller, PolylineFS, PolygonFS, TBitmapPolygonFiller, SegmentIntersect, DashLineFS
ArrowHead
BenchmarkConcept: Polygon rasterizer performance benchmarking
Techniques: Comparing different rasterizer back-ends and fill modes
API: TCanvas32, TImage32, TStrokeBrush, TSolidBrush, GR32_VPR2, GR32_Polygons.GDI, GR32_Polygons.GDIPlus,, GR32_Polygons.Direct2D, GR32_Polygons.AggLite
Benchmark
BlursConcept: Spatial blur filters (Gaussian, Motion, Selective)
Techniques: Multi-pass spatial convolution, box blur approximations, directional filtering
API: GR32.Blur, Blur32, MotionBlur, SelectiveGaussianBlur32
Blurs
ClipperConcept: Polygon Boolean operations and offsetting with Clipper
Techniques: Intersection, Union, Difference, XOR, polygon inflating/deflating
API: GR32_Clipper, TClipper32
Clipper
CubicSplineConcept: Cubic Spline Bezier curve construction
Techniques: Smooth curve fitting, interactive node control, vector path generation
API: TPolygonRenderer32VPR, BuildPolyPolyLine, PolyPolygonFS, TPaintBox32
CubicSpline
CurvesConcept: Vector path generation and spline curves
Techniques: Control point manipulation and stroke styling using TCanvas32
API: TCanvas32, TStrokeBrush, TSolidBrush, TDashedBrush, TCustomBrush, TNestedBrush, THammingKernel
Curves
GammaBlurConcept: Gamma-correct spatial blurring
Techniques: sRGB vs linear color space blurring comparisons
API: GR32.Blur, GR32_Gamma, Blur32
GammaBlur
GradFillsConcept: Vector polygon color gradients
Techniques: Linear and radial gradient fills with color stops
API: TLinearGradientPolygonFiller, TRadialGradientPolygonFiller, TRadialGradientSampler, TSamplerFiller, TColor32Gradient, PolygonFS, PolylineFS, TColor32LookupTable, TFlattenedPath, TextToPath
GradFills
GradLinesConcept: Gradient stipple lines and repaint optimization
Techniques: Custom line stippling patterns, incremental fading, repaint region tracking
API: SetStipple, StippleCounter, StippleStep, TPaintBox32, TBitmap32
GradLines
GradSamplerConcept: Gradient samplers and custom polygon fillers
Techniques: Sampler-based vector polygon rendering and color interpolation
API: PolygonFS, TPolygonRenderer32VPR, TBarycentricGradientSampler, TDiamondGradientSampler, TRadialGradientSampler, TConicGradientSampler, TXYGradientSampler, TXYSqrtGradientSampler, TInvertedDistanceWeightingSampler, TBarycentricGradientSampler, TVoronoiSampler, TSamplerFiller
GradSampler
GrowConcept: Polyline stroke expansion and outline inflation
Techniques: Path growing, join and end-cap styling
API: Grow, TImage32
Grow
LineStipplingConcept: Dashed and patterned vector lines
Techniques: Stipple pattern definition and phase offset control
API: SetStipple, StippleCounter, StippleStep, LineToFSP
LineStippling
MeshGradientsConcept: Mesh gradients and Delaunay triangulation
Techniques: Barycentric color interpolation across triangulated mesh nodes
API: PolygonFS, TPolygonRenderer32VPR, TVoronoiSampler, TAdaptiveSuperSampler, TInvertedDistanceWeightingSampler, TGourandShadedDelaunayTrianglesSampler
MeshGradients
PolygonsConcept: Vector polygon rasterization and canvas brush styles
Techniques: Stroke/fill brush management and VPR rendering
API: TCanvas32, TStrokeBrush, TSolidBrush, TJoinStyle, TPolyFillMode, TBitmapPolygonFiller
Polygons
RenderTextConcept: High-quality vector text rendering
Techniques: TrueType outline extraction and path rendering
API: RenderText, TCanvas32, TSolidBrush, TStrokeBrush, TBitmap32, TImage32
RenderText
Rotated textConcept: Rotated vector typography
Techniques: Affine path transformation and stroke/fill brush rendering
API: TAffineTransformation, TCanvas32, TSolidBrush, TStrokeBrush
Rotated text
ScatterPlotConcept: Statistical scatter plot visualization
Techniques: Rapid antialiased glyph/circle rasterization for large datasets
API: TPolygonRenderer32VPR, TImage32
ScatterPlot
SwarmConcept: Real-time particle animation and vector noise fields
Techniques: Particle dynamics driven by 2D Simplex noise with buffer fading
API: GR32.Noise.Simplex, TPaintBox32, TBitmap32, GR32_Blend
Swarm
TextVPRConcept: Advanced text layout and ClearType subpixel rendering
Techniques: Subpixel LCD antialiasing and paragraph typography
API: TPolygonRenderer32LCD, TPolygonRenderer32LCD2, TPolygonRenderer32VPR, TCanvas32, TSolidBrush
TextVPR
Thick LinesConcept: Polyline stroke width comparison
Techniques: GDI vs Graphics32 line drawing performance benchmarking
API: GR32.Lines.Thick, TStrokeBrush, TCanvas32
Thick Lines
VertexReductionConcept: Polyline vertex simplification
Techniques: Douglas-Peucker point reduction algorithm
API: TCanvas32, TStrokeBrush, TPaintBox32
VertexReduction
Bitmap32 to PSD layersConcept: Multi-layer Adobe Photoshop file export
Techniques: PSD binary file structure encoding and layer composition export
API: GR32.ImageFormats.PSD, TBitmap32, TImgView32
Bitmap32 to PSD layers
ByteMapsConcept: 8-bit intensity mapping and indexed color palettes
Techniques: Single-channel byte map storage and color table lookups
API: TByteMap, TImgView32, TBitmap32, TLinearResampler, TNearestResampler
ByteMaps
Color PickerConcept: Custom color selection controls
Techniques: HSV/RGB color space conversions and custom UI control painting
API: GR32_ColorPicker, GR32_ColorSwatch
Color Picker
HoverZoomConcept: Interactive viewport magnification
Techniques: Loupe/magnifying glass effect and mouse-tracking viewport layers
API: TImage32, TBitmapLayer, TCustomLayer, GR32_PNG
HoverZoom
Image32 backgroundConcept: Background pattern rendering for TImage32
Techniques: Checkerboard background options and custom paint stages
API: TImgView32, TBackgroundOptions
Image32 background
Image32Concept: Core features of TImage32
Techniques: Image display scale modes, alignment, scrollbars, and resampling kernels
API: TImage32, TKernelResampler, TLanczosKernel, TMitchellKernel
Image32
MandelbrotConcept: Procedural synthetic fractal generation
Techniques: Complex plane fractal calculation, multithreaded rasterization, sampler pipelines
API: TMultithreadedRegularRasterizer, TContourRasterizer, TCustomSampler
Mandelbrot
Optimized repaintConcept: Invalidation and repaint optimization
Techniques: Visualizing dirty rectangle tracking and selective redraws
API: TImage32, TImgView32, TPaintBox32, TBitmapLayer
Optimized repaint
Pan & ZoomConcept: Interactive viewport navigation
Techniques: Smooth panning, zooming, and mouse wheel scroll handling in TImgView32
API: TImgView32, TImage32
Pan & Zoom
PNG ExplorerConcept: Low-level PNG image format inspection
Techniques: Chunk parsing (IHDR, PLTE, tRNS, IDAT) and metadata extraction
API: GR32_PortableNetworkGraphic, GR32_PNG
PNG Explorer
PNG Image32Concept: PNG loading and display
Techniques: Full alpha channel transparency rendering in UI controls
API: GR32_PortableNetworkGraphic, GR32_PNG, TImage32, TBitmap32
PNG Image32
RotateConcept: Affine matrix rotation and scaling
Techniques: Direct matrix transformation applied to bitmap contents
API: TAffineTransformation, TImage32, GR32_Transforms
Rotate
Transparent formConcept: Per-pixel translucent Windows forms
Techniques: Layered window API integration (UpdateLayeredWindow)
API: TBitmapLayer, TImage32, TBitmap32, GR32_Blend
Transparent form
BounceConcept: Animated sprite layers and physics movement
Techniques: Time-based animation loops, easing curves, layer translation
API: TBitmapLayer, TImage32, TLinearResampler
Bounce
ImgView_LayersConcept: Interactive layer management
Techniques: Custom rubberband handles, layer rotation, locking, and hit testing
API: TImgView32, TBitmapLayer, TRubberbandLayer, TCustomLayer, TAffineTransformation, PolyPolygonFS
ImgView_Layers
PSD import exportConcept: Adobe Photoshop (PSD) file import and export
Techniques: Mapping Photoshop layer stacks and blend modes to TImgView32
API: GR32.ImageFormats.PSD, TBitmapLayer, TImgView32, PolygonFS, PolylineFS
PSD import export
RotLayerConcept: Transformed layer rendering
Techniques: Layer-level affine transformations with interactive control handles
API: TAffineTransformation, TImgView32, TLinearResampler
RotLayer
Space InvadersConcept: Retro game arcade mechanics
Techniques: Sprite layer management, collision detection, fast frame redrawing
API: TBitmapLayer, TImage32, TNearestResampler, TBitmap32
Space Invaders
SpritesConcept: High-density sprite layer performance
Techniques: Repaint optimization benchmark with thousands of moving sprite layers
API: TBitmapLayer, TImage32, TBitmap32, GR32_Transforms
Sprites
WaterEffectConcept: Fluid wave and ripple simulation
Techniques: Wave propagation buffers, displacement mapping, custom paint stages
API: TCustomLayer, TImage32, TBitmap32, TIntegerMap, GR32_OrdinalMaps
WaterEffect
LionLion
NestedSamplingConcept: Nested sampler pipelines
Techniques: Chaining super-samplers, color transformers, and custom rasterizers
API: TCustomSampler, TSuperSampler, TContourRasterizer
NestedSampling
PixelFConcept: Subpixel precision sampling
Techniques: Floating-point pixel addressing (PixelF vs PixelFS)
API: PixelF, PixelFS, TImage32, TBitmap32, GR32_Blend
PixelF
ResamplersConcept: Bitmap resampling filters
Techniques: Comparing resampler kernels (Nearest, Linear, Lanczos, Mitchell, Cubic, Gaussian)
API: TLinearResampler, TKernelResampler, TLanczosKernel, TMitchellKernel, TCubicKernel, PolygonFS, PolylineFS
Resamplers
Resize and RotateConcept: Scaled and rotated bitmap resampling
Techniques: Combining affine transformations with kernel resamplers and rasterizers
API: TAffineTransformation, TKernelResampler, TCubicKernel, TImgView32
Resize and Rotate
SharpenConvolutionConcept: Image sharpening filters
Techniques: Spatial convolution filtering via kernel samplers
API: TLinearResampler, TNearestResampler, TImgView32, TIntegerMap
SharpenConvolution
ImgWarpingConcept: Non-linear image deformation and warping
Techniques: Grid displacement remapping and interactive mesh warp tools
API: TRemapTransformation, TVectorMap, TImgView32, TKernelResampler, TSuperSampler
ImgWarping
Perspective CorrectionConcept: 3D perspective distortion and quad mapping
Techniques: Forward and inverse projective transformations with interactive handles
API: TImage32, TProjectiveTransformationEx, TPolygonRubberbandLayer, TLinearResampler, TDraftRasterizer
Perspective Correction
SphereConcept: 3D spherical projection transformation
Techniques: Spherical mapping, interactive Arcball 3D rotation, multithreaded rasterization
API: TMultithreadedRegularRasterizer, TDraftRasterizer, TLinearResampler, TPaintBox32, TBitmap32
Sphere
TransformConcept: Compound transformations
Techniques: Chaining affine and non-linear transformations (twirl, skew, rotate, scale)
API: TImage32, TAffineTransformation, TKernelResampler
Transform
VisualizationConcept: Real-time audio waveform and spectrum visualization
Techniques: High-frequency feedback buffer updating and real-time plotting
API: TVectorMap, BlendReg, GR32_LowLevel
Visualization