Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Gradient tool snapping with locked angle

Đang mở
#4,613 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
computer-graphics

Hướng nghiên cứu

Reproduce the issue with a rectangle and constrained gradient drag, then inspect the gradient tool code around lines 599-610 and 631. Compare its constrained-angle handling with SnapConstraint::Line in editor/src/messages/tool/common_functionality/shapes/line_shape.rs around lines 157-164. Done means angle-locked gradients still snap to the rectangle and previous overlays do not remain stuck during the drag.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Reproduction

  1. New document
  2. Draw rectangle
  3. Use the gradient tool to draw a gradient
  4. Press Ctrl or Shift to lock the angle
  5. Observe how the snapping to the rectangle no longer occurs and any old overlays get stuck until finishing the drag

Video

https://github.com/user-attachments/assets/de604938-8d10-46bd-917b-4ac8a09dde3a

Relevant code

The line tool uses SnapConstraint::Line to snap when constrained to an angle:
https://github.com/GraphiteEditor/Graphite/blob/f7562b6fd7428f887ba8ed833692535ad9b94ec4/editor/src/messages/tool/common_functionality/shapes/line_shape.rs#L157-L164

The gradient tool completely ignores snapping when an angle constraint exists:
https://github.com/GraphiteEditor/Graphite/blob/f7562b6fd7428f887ba8ed833692535ad9b94ec4/editor/src/messages/tool/tool_messages/gradient_tool.rs#L599-L610
https://github.com/GraphiteEditor/Graphite/blob/f7562b6fd7428f887ba8ed833692535ad9b94ec4/editor/src/messages/tool/tool_messages/gradient_tool.rs#L631

Ngôn ngữ chính
Rust
Star
27.3k
Fork
1.3k
Merge trung bình
15 giờ 42 phút
Pull request đã merge (30 ngày)
84

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của GraphiteEditor/Graphite

Tất cả issue của GraphiteEditor/Graphite

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.