Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
yisibl
reviewed
Jan 28, 2024
yisibl
reviewed
Jan 29, 2024
src/lib.rs
Outdated
| // https://github.com/napi-rs/napi-rs/releases/tag/napi@2.4.3 | ||
| pub fn get_bbox(&self) -> Either<BBox, Undefined> { | ||
| match self.tree.root.calculate_bbox() { | ||
| match self.tree.root.bounding_box { |
Member
There was a problem hiding this comment.
这里新的 API 应该是 abs_bounding_box(),但还需要考虑 SVG 有 stroke 的情况。所以我得看一下是不是要运用 abs_stroke_bounding_box()。
等我增加一些测试用例。
yisibl
reviewed
Jan 29, 2024
yisibl
reviewed
Jan 29, 2024
yisibl
reviewed
Jan 29, 2024
| tree.convert_text(&fontdb); | ||
| tree.postprocess(Default::default(), &fontdb); | ||
| tree.calculate_abs_transforms(); | ||
| tree.calculate_bounding_boxes(); |
Member
There was a problem hiding this comment.
我们需要预先计算这两个吗?calculate_abs_transforms()、calculate_bounding_boxes()
Member
|
备忘:当我们有时间再次回到 resvg 版本升级的时候,记得跑一下这个性能测试:vercel/satori#706 |
15dd771 to
34c1451
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.