Skip to content

Commit

Permalink
Fix canvas size limits calculation.
Browse files Browse the repository at this point in the history
Closes #791
  • Loading branch information
RazrFalcon committed Jul 13, 2024
1 parent 11a8423 commit 1a6922d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This changelog also contains important changes in dependencies.

## [Unreleased]

### Fixed
- Canvas size limits calculation.

## [0.42.0] - 2024-06-01
### Added
- `resvg` can render color fonts now, aka Emojis.<br>
Expand Down
8 changes: 4 additions & 4 deletions crates/resvg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ pub fn render(
let max_bbox = tiny_skia::IntRect::from_xywh(
-(target_size.width() as i32) * 2,
-(target_size.height() as i32) * 2,
target_size.width() * 4,
target_size.height() * 4,
target_size.width() * 5,
target_size.height() * 5,
)
.unwrap();

Expand Down Expand Up @@ -71,8 +71,8 @@ pub fn render_node(
let max_bbox = tiny_skia::IntRect::from_xywh(
-(target_size.width() as i32) * 2,
-(target_size.height() as i32) * 2,
target_size.width() * 4,
target_size.height() * 4,
target_size.width() * 5,
target_size.height() * 5,
)
.unwrap();

Expand Down

0 comments on commit 1a6922d

Please sign in to comment.