* New nodes: 'Gradient Reverse', 'Gradient Shift', and 'Gradient Stretch' nodes for rearranging a ramp's stops
* Clip a lone out-of-range stop into the bake, and correct the docs that still promised edge-held stops
* Upgrade Vello to a git main revision that honors the brush's interpolation alpha space
* Interpolate Vello gradients with straight alpha, matching the SVG renderer
* Draw the gradient picker strip and fill swatches as SVG so transparency previews with straight alpha
* Keep gradient stop handles opaque so a transparent stop's RGB stays visible
* Paint a stopless gradient's picker strip and swatch black rather than transparent
* Delete dead code function
* Add a Gradient Interpolation axis with Stepped, Linear, and Smooth paths through the stops
* Keep the gradient interpolation attached when dragging stops in the picker
* Give the gradient popover's dropdowns the same tooltips as their row labels
* Order the gradient popover with Intrp. above Space
* Hold gradient stops in place when the cyclic flag is toggled
* Fix wrong Smooth gradient colors around stops sitting on the ramp boundaries
* Consolidate gradient settings plumbing and fix bugs
* Bundle whole-ramp gradient settings into GradientSettings across the editor plumbing
* Name the Smooth gradient interpolation's spline type in its tooltip
* Linearize the gamma hex stop colors recovered from imported Graphite SVGs
* Code review
* Aim the Smooth bake's seam subdivision at the copied boundary color
* Add GradientEvaluator to build gradient sampling state once per loop instead of per sample
* Correct the gradient evaluator's documented setup cost to O(n log n)
* Add a Cyclic gradient attribute that wraps the stop list through the 1|0 boundary back to the first stop
* Show the wrap segment's midpoint diamond in the color picker spectrum strip when cyclic
* Keep the wrap midpoint diamond tracking the pointer by a wrapped strip width when dragged past the ends
* Give the Gradient tool's viewport overlay the same cyclic wrap midpoint diamond and drag behavior
* Correct the docs claiming the final stop's midpoint is always ignored now that cyclic uses it
* Move the gradient cyclic toggle onto the Ends row as a Link icon checkbox
* Update labels
* Register GradientHueDirection with the Data panel so its attribute column renders
* Reword wrap segment to wrapped interval and stray segment usages to interval
* Clean up comments
* Fix the color picker write-back losing default position elision and the blend path guessing the cyclic flag
* Add an OkLab gradient interpolation space and make it the new default
* Fix the Properties panel fill row resetting the gradient interpolation space to the default
* Add OkLch, Lab, LCh, and HSL gradient interpolation spaces
* Add a hue direction attribute and picker choice for polar gradient interpolation spaces
* Add an HSV gradient interpolation space
* Rename the sRGB Linear and sRGB Gamma gradient spaces to RGB Linear and RGB Gamma
* Divide the gradient interpolation dropdown between absolute and relative color spaces
* Rename the OkLch gradient interpolation space to OkLCh for channel-notation capitalization
* Shorten the color picker popover's hue direction row label to Arc
* Call the Gradient Interpolation node's parameter Space and extend the picker tooltip title to match
* Rename the gradient interpolation attribute and type family to gradient space
* Rename the gradient tool's gradient space transform to gradient to viewport transform
* Add serde aliases and a node replacement covering the gradient space renames
* Give the gradient space choices artist-facing labels and reorder the dropdown sections
* Add a Gradient Hue Direction node and its attribute read node
* Say interpolate instead of blend for gradient stop color traversal in docs and tooltips
* Label the polar perceptual gradient spaces as Perceptual Hue and group the dropdown sections by geometry
* Add a migration alias covering the gradient space attribute reader rename
* Carry the gradient hue direction attribute through boolean operations
* Register GradientHueDirection wire types in the node registry
* Build dropdown menu entries from choice type metadata
* Add a gradient interpolation color space attribute, blending stops in linear light by default
* Add a Space interpolation dropdown to the color picker popover
* Stamp legacy gradient ramps with their implicit gamma interpolation during deserialization
* Resolve color-interpolation from SVG style blocks and fix cascade order among repeated declarations
* Rename spread method to gradient spread so it matches the other gradient attribute names
* Keep the legacy gradient struct's spread method field name matching its on-disk key
* Rework Gradient into a newtype of List<Color> with optional position and midpoint attributes
* Fix Vello stopless-gradient fallback coverage, empty legacy gradient tables, the node docs gradient swatch, NaN position elision, and wired setter input overwrites
* Rename the node 'Length' -> 'Magnitude'
* Rename the node 'Flatten Path' -> 'Combine Paths'
* Replace the node 'Vec2 Value' with 'Combine Vec2' and add a new 'Vec2 Value' that's actually a vec2
* Update demo artwork
* Allow using any graphics type for fill
* Adapt gradient/fill property panels and tools to handle List<T>
* Make the initial gradient transform covers the target's bounding box
* Introduce AnyGraphicListDyn to avoid combinatorial explosion
* Allow using any graphics type for stroke paint
* Add FIll node migration
* Add `for_each_vector_list_mut` instead of `set_paint_attribute`
* Adapt paint flow to read and write attributes instead of legacy Fill/Stroke.color
* Fix responsibilities of paint related node input setters
* Fix Morph by storing List<Graphic> for attributes rather than the concrete types
Store fill/stroke paints as List<Graphic> so Color/Gradient transitions
do not hit set_attribute_value_dyn's type-mismatch fallback to default paint.
* Preserve paint attributes in vector editing ops
* Enhance the clarity between direct and chained fill gradients
* Update demo arts
* Consolidate Fill node gradient appearance inputs
* Fix after the cubic review
* Revert "Consolidate Fill node gradient appearance inputs"
This reverts commit 9622feb20196e2c4da99e98ca95dcc2e34c2c98e.
* Replace AnyGraphicListDyn with generic paint connectors on the Fill and Stroke nodes
* Canonicalize paint attribute storage to List<Graphic> with a single write helper
* Fix Solidify Stroke missing fills stored in the legacy style
* Fix Solidify Stroke producing invisible strokes for legacy-only stroke colors
* Fix the initial gradient transform ignoring the bounding box's vertical extent
* Step paint at the morph midpoint instead of dropping it for unmixable pairings
* Remove migration-stage comments
* Clarify the initial gradient transform helper's doc and name
* Correct the bake_paint_transforms doc and prune dead tolerance arms
* Delete the unused Gradient::lerp
* Fix a comment typo
* Thread network paths through the legacy gradient bake so nested fills migrate
* Restore the legacy fill fallback in Expand Fill and Stroke
* Read gradient stops from the node's own input in the Fill properties panel
* Use the transform input constant instead of a hardcoded index
* Remove the unreachable wired color fallback in the Fill properties solid branch
* Narrow the fill overlay redraw check to actual fill inputs
* Coalesce the fill setter's graph runs into a single dispatch
* Position the Gradient Value node inserted for gradient stops
* Bake backup gradient placement during migration
* Persist pending gradient bakes so unfinished migrations retry on reopen
* Migrate the backup gradient's type and spread method
* Harden the gradient-migration pass against document switches and stale bakes
* Keep the Fill properties UI for layerless and nested Fill nodes
* Leave a wired gradient transform input connected instead of overwriting it
* Refuse to start a gradient chain ahead of existing layer content
* Decode a Fill node's gradient through one shared reader
* Nudge a degenerate bounding box so the Fill gradient transform stays invertible
* Broadcast Fill and Stroke paint with a single attribute-column pass
* Fix Morph stepping the target's stroke in near the source instead of the target
* Tidy conventions: clippy get_first, comment periods, sentence-case test messages
* Reattach the gradient orientation doc to its function
* Re-save demo artwork
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Migrate legacy gradients via an isolated measurement pre-pass
Convert legacy bounding-box-relative Fill::Gradient values to absolute
space on document load by measuring each fill's evaluated geometry,
rather than walking each layer's primary flow. The pre-pass scans the
whole root network so fills on secondary branches (e.g. a Copy to Points
instance) and fills in hidden, disabled, or orphaned branches are all
found, redirecting the document export to each fill in turn to force its
branch to evaluate and reading its geometry back from the inspect result.
With every legacy gradient converted before any render, the legacy
bounding-box render path is removed: the ATTR_GRADIENT_LEGACY marker, the
renderer's legacy brush branch, and fill_to_graphic_list's bbox bake all
go away. Gradients nested inside subgraph node networks are out of scope
and warned about.
* Address review: harden gradient migration against stalls and document switches
- Advance the queue on dispatch early returns (missing export or channel
send error) so a failure can't leave the migration permanently stuck
with the document unable to render.
- Tag the migration with its DocumentId: cancel-and-restart when a
different document's migration is requested, and only apply a
measurement to the active document's in-progress migration, so
switching documents mid-migration can't stall or cross-apply.
* Remove nested network non-migration warning
* Cleanup
* Also add migrations for Fill node backup colors
* Apply migrations to the demo art
* Use userSpaceOnUse to render gradient on SVG
* Allow non-uniform transform to radial gradient on vello
* Position gradients absolutely instead of by bbox
* Fix SVG import by removing multiplication of bound's inverse transform
* Represent sheared linear gradients via their equivalent gradient line
* Migration
* Fix migration for radial (elliptical) gradients
* Fix boolean operation gradients
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* feat: Render List<String> as raw paths in SVG and Vell mode
* chore: code review
* chore: change the hardcoded layout bounds to parley's
* chore: code review
* feat: Split text node to text_layer and text_to_vector node
* fix: CI fail because of difference in nature of Mac and github action
* chore: fix
* chore: replace FontStack as it got removed in parley 0.9
* chore: fmt
* chore: migrate the rendering as of new resource architechture
* chore: add text_layer node to text tool for testing
* code review
* Make boolean ops support the Text type
* chore: Move fallback_font_resource authority from editor to text node
* Fix 'Text Layer' node missing font dropdown
* Change node doc comments from Vec<T> to T[]
* Add migrations from the old Text node to Text -> Text to Vector
* Consolidate
* Rename the text attributes and reorder tilt to come before max_width/height
* Detect legacy Text nodes in the split migration by their trailing separate_glyphs input
* Code review
* Frame Text layer thumbnails by laying out their text for bounds
* Give Text layers click targets and selection outlines via collect_metadata
* Route Text tool through Text to Vector with fill, fixing editing-preview placement
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Make is_branching and free-point click targets O(n) instead of O(n^2)
* usize -> u8
* Fix profiling CI treating performance improvements as regressions
* Add conversion from Fill to Table<Graphic>
* Refactor Vector vello renderer for Gradient / Color
* Refactor Vector SVG renderer for Gradient / Color
* Fix conflicts
* Add basic clipping-based fill for SVG rendering
* Use Cow to avoid cloning graphic list for fill
* Cleanup for Cow usage
* format code
* Use `<pattern>` instead of `<clipPath>` for clip
This simplifies the future implementation of clipping-based rendering
for strokes, as the stroke does not support the use of a clip path but
rather paint sources from a paint server.
* Move svg pattern rendering function to RenderExt
* Fix comment
* Fix empty fill list rendering as default black
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* Move opaque check function to Graphic impl
* Add color converter and debug node to use graphic
* WIP: Use List<Graphic> to render Color & Gradient
* Use `Arc<List<Vector>>` for vector_data metadata
This exposes List's attributes to message handlers, enabling them to
access the necessary attribute data such as ATTR_STROKE_PAINT_GRAPHIC
as `Fill` and `Stroke` will not have paint information in the future.
* Recurse opacity checks on nested `Graphic`
Also extracts `fill_graphic_list_at` /
`stroke_paint_graphic_list_at` to share the row-attribute
lookup across the existing call sites.
* Fix fill and stroke visibility check degradation
* Fix clipping based stroke paint positioning
* Refactor vello renderer for stroke to use graphic
* Reduce `Fill` / `Stroke.color` to `List<Graphic>` allocations
* Revert "Use `Arc<List<Vector>>` for vector_data metadata"
This reverts commit 4285243a5d
* Expose paint row attributes as dedicated metadata for vectors
Add `fill_attributes` / `stroke_paint_attributes` to `DocumentMetadata`
so the `ExpandFillStrokeOnSelectedLayers` handler can read row paint
visibility without exposing entire `List<Vector>`.
* Fix transparency check to consider fill opacity
* Fix consistency of gradient placement for SVG stroke
* Rename `stroke_paint_..` to `stroke_..`
* Remove debug nodes
* Allow to use any graphic type without casting
* Rename `fill_graphic` / `stroke_graphic` to `fill` / `stroke`
* Fix SVG pattern placement when stroke transform differs from item transform
* Fix click target fill check for empty list in graphic
* Fix blank fill/stroke attribute masking legacy style
* Fix SVG's paint order trick for vector/raster fills
* Add zero-division guard for pattern wraparound prevention
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>