Changelog for gb-vector-0.1.0.0
Changelog
0.1.0.0
Initial release.
Core Types
V22D vector,Segment(line/cubic/quad/arc),Path(closed/open)Colortype with RGBA in[0, 1]—rgb,rgba,rgb8,hexconstructors- 43 named colors,
lerp,withAlpha,toHex hsl,hsla— HSL color construction- Oklab perceptual color space:
toOklab,fromOklab,lerpOklab - Color adjustments:
lighten,darken,saturate,desaturate,invert
Element Tree
Elementrecursive sum type — style and transforms as wrapping constructors- Compose via function application or left-to-right with
(&) Semigroup/Monoidinstance viaEGroup
Shapes
circle,rect,roundedRect,ellipse,polygon,starline,square,regularPolygon,arc,ring
Path DSL
PathBuildermonad:startAt,lineTo,cubicTo,quadTo,arcTo,closePathpolylinePath,polygonPathconvenience constructors
Path Operations
reversePath,measurePath— reversal and arc lengthsplitPathAt,subpath— splitting and extractionoffsetPath— parallel curve approximationsimplifyPath— Ramer-Douglas-Peucker simplification
Boolean Operations
union,intersection,difference,xorPaths— polygon clippingpathToPolygon,polygonToPath— conversion utilitiespolygonArea,pointInPolygon— polygon analysis
Transforms
translate,rotate,rotateAround,scale,scaleXY,skewX,skewYMatrixtype withidentity,composeMatrix,applyMatrix- Matrix constructors:
translateM,rotateM,scaleM,scaleXYM,skewXM,skewYM
Style
fill,fillGradient,stroke,strokeEx,dashedStroke,defaultStrokeConfigopacity,fillNone,fillRuleclip,mask,blur,dropShadow,withId,use
Noise
perlin2D,simplex2D— deterministic 2D noisefbm— fractional Brownian motionnoisePath,noiseClosedPath— procedural path generationwobblePath,jitterPoints— noise-driven distortionvoronoiCells,voronoiEdges— Voronoi diagram generation
Patterns
dotGrid,lineGrid,crosshatch,checker— tileable pattern generatorspatternDef,PatternConfig— SVG pattern element construction
SVG Parsing
parseSvg,parseElement— parse SVG text back toElementtrees- Supports basic shapes, paths, groups, text, and presentation attributes
- Enables round-trip workflows: render, parse, manipulate, re-export
Composition
group,empty,document,documentWithViewBox,backgroundoptimizeElement— collapse redundant transforms and empty groups
SVG Output
render :: Document -> Text— pure SVG serializationwriteSvg :: FilePath -> Document -> IO ()— file output