Comprehensive demonstration of SWCanvas deterministic 2D rendering capabilities âĸ đ View on Github
About SWCanvas: A deterministic 2D Javascript raster engine with Canvas-like API, cross-browser and Node.js.
This demo showcases the key features using the minified production build.
Note: SWCanvas focuses on graphics primitives - text rendering is not implemented.
Render Time:-ms
đˇ Basic Shapes
Filled rectangles with solid colors
Stroked rectangles with various line widths
Complex polygon paths
Curved paths with arcs and beziers
đ Gradients & Patterns
Linear gradients with multiple color stops
Radial gradients with inner/outer circles
Conic gradients with sweep angles
Repeating image patterns
đ Transformations
Translation (position offset)
Rotation around pivot points
Scaling (uniform and non-uniform)
Combined transformation matrices
âī¸ Clipping & Masking
Rectangular clip regions
Complex path-based clipping
Nested clipping with intersections
Save/restore clip stack management
đī¸ Stroke Styles
Various line caps (butt, round, square)
Line joins (miter, round, bevel)
Dashed line patterns with offsets
Sub-pixel stroke rendering
đ Alpha Blending
Semi-transparent overlays
Global alpha compositing
Source-over blending mode
Premultiplied alpha handling
đ Shadow Effects
Configurable shadow color with transparency
Variable blur radius for soft shadows
X/Y offset controls for shadow positioning
Works with all drawing operations and paint sources