Skip to content

Segment molding Shift key X/Y constraint - #4687

Open
Jangidyogesh12 wants to merge 5 commits into
GraphiteEditor:masterfrom
Jangidyogesh12:snapping-axis-on-bezier-curve
Open

Jangidyogesh12 wants to merge 5 commits into
GraphiteEditor:masterfrom
Jangidyogesh12:snapping-axis-on-bezier-curve

Conversation

@Jangidyogesh12

@Jangidyogesh12 Jangidyogesh12 commented Oct 13, 2026 •

Copy link
Copy Markdown

feat : snapping bezier segment to x or y axis with with center at t =0.5

This pr is the implementation of the feature requested in issue #3760

Logic used :

IF snap_key_pressed:
mid = to_viewport(bezier.eval(0.5))
molding_snap_origin = mid
delta = mouse - mid
axis = X if |delta.x| >= |delta.y| else Y
mouse = (mouse.x, mid.y) if axis == X else (mid.x, mouse.y)
ELSE:
axis = None
molding_snap_origin = None
mouse = mouse

IF axis != None:
origin = molding_snap_origin ?? drag_start
draw X-line / Y-line through origin

pr_xy_molding.mp4

@Jangidyogesh12
Jangidyogesh12 marked this pull request as draft October 13, 2026 07:48
@Jangidyogesh12
Jangidyogesh12 marked this pull request as ready for review October 13, 2026 08:29

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply to a comment to ask cubic a question or push back. It learns from your replies.

Re-trigger cubic

Comment thread editor/src/messages/tool/tool_messages/path_tool.rs
Comment thread editor/src/messages/tool/tool_messages/path_tool.rs Outdated
Comment thread editor/src/messages/tool/tool_messages/path_tool.rs
@Jangidyogesh12 Jangidyogesh12 changed the title feat : snapping bezier segment to x or y axis with with center at t =… Segment molding Shift key X/Y constraint Oct 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant