Conversation
PR to dev
- move rect and ellipse rendering to the shared canvas shape renderer - remove obsolete rect and ellipse canvas renderers - introduce reusable shape path commands - add stroke path geometry with outer and inner contours - support inside, center and outside stroke alignment - support independent stroke widths - preserve corner radius geometry for strokes - add gradient rendering for stroke areas - reuse gradient paint pipeline for fill and stroke - decouple transform overlay bounds from visual stroke bounds - align focus, hover, resize and rotate handles with intrinsic shape OBB - keep stroke as a visual extension without affecting transform bounds
- Added functions to resolve stroke pattern contours, edges, geometry, intervals, offsets, and paths. - Introduced new types for stroke styles, including dashed, dotted, and custom styles. - Enhanced the RendererCanvasShape to support rendering different stroke styles based on user-defined properties. - Refactored stroke rendering logic to accommodate new stroke styles and properties. - Improved handling of stroke alignment and caps during rendering.
…tate management refactor(ellipse): remove unused arc calculations and streamline inner arc logic refactor(renderer): clean up stroke segment type definition in RendererCanvasShape fix(renderer): update hover renderer to handle screen contours and improve shape rendering refactor(corner-radius): remove unused normalization function from HandleCornerRadius
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request improves stroke rendering and canvas interaction behavior across desktop and touch devices.
It adds rendering support for dotted strokes, restores shape-accurate hover outlines, prevents browser navigation gestures while interacting with the canvas, and enables one-finger camera panning on touch devices.
Motivation
Canvas interaction should remain predictable and consistent across different input devices.
Previously:
StrokeStyle.Dottedwas available in the stroke configuration but was not rendered.These issues made the canvas feel less precise and less suitable for editor-style workflows.
Changes
Added dotted stroke rendering using the existing geometric dashed-stroke pipeline.
Prevented default wheel and trackpad browser behavior only over registered input surfaces.
Added local
overscroll-behaviorandtouch-actionhandling for canvas surfaces.Added one-finger touch panning through the existing Pointer Events input system.
Added pointer delta accumulation and active-pointer filtering.
Preserved pointer capture while panning outside the initial canvas bounds.
Restored precise hover outlines based on
ShapePathCommandgeometry instead of world bounding-box corners.Added hover contour handling for:
Kept existing mouse, trackpad, keyboard, and dashed-stroke behavior intact.
Testing
Tested manually in the Playground.
Verified:
Public API
The existing stroke-style and input APIs are reused. The changes are limited to renderer and interaction behavior.
Visual changes
Recommended attachments:
Checklist