SVG importer ignores `fill-rule="evenodd"`

未关闭
#4,332 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #4337 来自 @NicTanghe —— 已关闭,未合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
rust

调研方向

首先定位 SVG 导入器,并使用 fill-rule-evenodd.svg 重现该问题,将 Graphite 的结果与浏览器或其他 SVG 查看器的结果进行比较。跟踪导入器如何处理 fill-rule="evenodd";当内方形变成透明孔洞且导入的形状与 SVG 渲染结果一致时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Description

The SVG importer does not respect fill-rule="evenodd". A compound path whose inner subpath should create a transparent hole is imported as a solid shape. follow up of #4329

Steps to reproduce

  1. Open fill-rule-evenodd.svg in a browser or another SVG viewer. It appears as a purple square with a transparent square hole.
  2. Import the same file into Graphite.
  3. Compare the imported result with the browser rendering.

Expected behavior

The imported shape is a purple square with a transparent square hole, matching the SVG rendering in a browser.
Image

Actual behavior

The inner square is filled, so the imported result is a solid purple square. The importer behaves as if the path used the default nonzero fill rule.

Image
主要语言
Rust
星标
27.8k
派生
1.3k
平均合并
10 小时 53 分钟
30 天内合并 PR
195

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GraphiteEditor/Graphite 的其他 Issue

查看 GraphiteEditor/Graphite 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。