Skip to content

Commit

Permalink
Remove outdated methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
RazrFalcon committed Feb 4, 2024
1 parent e6e1d20 commit 22c4bf9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
This changelog also contains important changes in dependencies.

## [Unreleased]
### Added
- `usvg::Group::abs_bounding_box`
- `usvg::Group::abs_stroke_bounding_box`
- `usvg::Path::abs_bounding_box`
- `usvg::Path::abs_stroke_bounding_box`
- `usvg::Text::abs_bounding_box`
- `usvg::Text::abs_stroke_bounding_box`

### Removed
- `usvg::Group::abs_bounding_box()` method. It's a field now.
- `usvg::Group::abs_filters_bounding_box()`

### Fixed
- `font-family` parsing.
- Absolute bounding box calculation for paths.
Expand Down
2 changes: 1 addition & 1 deletion crates/c-api/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ pub extern "C" fn resvg_get_image_bbox(
if let Some(r) = tree
.0
.root
.abs_bounding_box()
.abs_bounding_box
.and_then(|r| r.to_non_zero_rect())
{
unsafe {
Expand Down
10 changes: 0 additions & 10 deletions crates/usvg-tree/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,11 +1007,6 @@ impl Group {
!self.children.is_empty()
}

/// Returns node's bounding box in canvas coordinates.
pub fn abs_bounding_box(&self) -> Option<Rect> {
self.bounding_box?.transform(self.abs_transform)
}

/// Calculates a node's filter bounding box.
///
/// Filters with `objectBoundingBox` and missing or zero `bounding_box` would be ignored.
Expand Down Expand Up @@ -1044,11 +1039,6 @@ impl Group {
full_region.to_non_zero_rect()
}

/// Calculates a node's filter bounding box in canvas coordinates.
pub fn abs_filters_bounding_box(&self) -> Option<NonZeroRect> {
self.filters_bounding_box()?.transform(self.abs_transform)
}

fn subroots(&self, f: &mut dyn FnMut(&Group)) {
if let Some(ref clip) = self.clip_path {
f(&clip.borrow().root);
Expand Down

0 comments on commit 22c4bf9

Please sign in to comment.