GraphiteEditor / GraphiteEditor/Graphite
Support for SVG filter effects
- 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ả
SVG has support for many filter effects (elements prefixed with `fe`). Documentation is available on [MDN list of SVG elements](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feDropShadow). A filter can be made by composing one or more of these filter effects. For example a glow could be made by combining the [`feMorphology`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feMorphology) to make the element thicker and then the [`feGaussianBlur`](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/feGaussianBlur) to blur the result. This can allow for powerful graphic effects whilst remaining a vector (useful for exporting and performance). Examples from the Inkscape filter gallery:
Filters can also be composed by hand using a filter editor view:
This style of approach lends itself well the the existing graphite node graph.
Currently there is implemented a raster based blur and the ability to change the blend mode (this is implemented with the blend mode not a filter effect). However this significantly limits the possibilities compared to Inkscape.
The filter effect must also be implemented in the vello rendering pipeline, attempting to match the SVG rendering in a browser. For efficient SVG output, it should be possible to combine filter effects applied to an element into a single filter that can be reused. However this is not a particular priority given the rest of the SVG output is horrible.
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 nghiên cứu cách triển khai hiện có dựa trên raster cho hiệu ứng làm mờ và chế độ hòa trộn, sau đó theo dõi cách các hiệu ứng bộ lọc sẽ đi qua đồ thị nút Graphite và pipeline kết xuất vello. Sử dụng các tài liệu tham chiếu phần tử SVG của MDN được liên kết để so sánh hành vi mong đợi với việc kết xuất SVG của trình duyệt; công việc được xem là hoàn tất khi có các hiệu ứng bộ lọc SVG kết hợp, đầu ra của vello khớp và có các bộ lọc kết hợp có thể tái sử dụng khi thực tế cho phép.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- backend-api-design, 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
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 28/100