What problem does it solve?
This Skill helps you build crisp, SVG-like vector graphics in PixiJS without falling into v7-era drawing patterns, so your shapes render correctly and remain efficient to reuse.
Core Features & Use Cases
- Shape-then-style vector drawing: Create shapes and paths with
Graphics by drawing geometry first, then applying fill() and stroke() for consistent chaining behavior.
- Advanced fills, gradients, patterns, and holes: Use
FillGradient (linear/radial), FillPattern, texture-based fills, and cut() holes (including multiple-hole workflows).
- Reusable contexts and prebuilt paths: Share a
GraphicsContext across Graphics instances to avoid duplicate tessellation, and reuse GraphicsPath to draw the same shape efficiently many times.
- Rendering-quality utilities: Support draw-time transforms (
rotateTransform, translateTransform, setTransform), cloning/clearing/bounds, topology-aware containsPoint hit testing, and SVG import/export (svg, graphicsContextToSvg).
Quick Start
Create a Graphics instance, draw a shape using methods like rect() or moveTo()/lineTo(), then apply fill() and optionally stroke().