GraphiteEditor / GraphiteEditor/Graphite

Freeform gradients

Đang mở
#2,303 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Graphics
Ngôn ngữ chính
Rust
Star
27.2k
Fork
1.3k
Merge trung bình
20 giờ 5 phút
Pull request đã merge (30 ngày)
57

Mô tả

Similar to #2302, we need to find a clever way to generate these within the SVG or SVG + CSS spec. Rasterization is probably the most likely approach here. But here are some ideas:

- Rasterization.
- A point cloud of circles with radial gradients interpolating over alpha, with optional transforms to essentially create 2D Gaussian splats.
- For use cases supporting CSS as part of SVG, we can render quads with linear gradients applied to each edge which generates a quad of a mesh, then the CSS perspective transform would skew the four corners to fit within the mesh adjacent to other quads doing the same thing to build a mesh representing the full freeform gradient.

There are two possible sources of color spread, which can be mixed:
- Point (with a color and radius)

![Image](https://github.com/user-attachments/assets/45268a9d-63ed-4902-8982-b0dccb30edbd)

- Path (with a color interpolated along the path, such as being set at each anchor)

![Image](https://github.com/user-attachments/assets/8f240d5b-7f7f-46ec-a4ab-f5bb52f554a8)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách đọc issue #2302 và các đặc tả SVG và CSS liên quan để hiểu các yêu cầu về gradient tương ứng. So sánh các phương pháp rasterization, point-cloud và mesh được liệt kê; có thể xem là hoàn tất khi Graphite có thể tạo các gradient tự do với độ lan màu dựa trên điểm và đường dẫn theo yêu cầu.

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

Đánh giá

Công nghệ
css, rust
Lĩnh vực
computer-graphics
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

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.