Skip to content

Conversation

@newinnovations
Copy link
Contributor

  • Added round and intersect
  • Allow for the fact that mupdf may return invalid rectangles (x1<x0 or y1<y0) in case of empty result
  • Use mupdf C-library whenever possible (there is no union for fz_irect in mupdf-c)

These additions are required for the work mentioned in #155

@newinnovations
Copy link
Contributor Author

Min and max not being used in mupdf itself probably largely to blame on C not having it and defining "fz_int_min" just for that to be a little overkill. Adding it in the Rust code makes it a lot more readable and I would be thankful if you could add that.

Done that and reverted the style changes

Check now fails on mingw32 build, which seems not related to the PR but to a mismatch of architectures on libclang.dll

@ginnyTheCat
Copy link
Collaborator

Done that and reverted the style changes

Sorry for being annoying about this, but thanks for doing this. Looks great now

Check now fails on mingw32 build, which seems not related to the PR but to a mismatch of architectures on libclang.dll

Probably this is caused by clang being updated from 17.13.35710.127 to 17.14.36015.10 in actions/runner-images#12424. Who even knows if this is on purpose or accidental (seems like other LLVM things are breaking in this update as well).

@ginnyTheCat
Copy link
Collaborator

I fixed the 64bit lib issue using

diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index 7700d8e..526bb7e 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -100,6 +100,7 @@ jobs:
       - run: rustc --version --verbose
       - run: cargo test --features serde
         env:
+          LIBCLANG_PATH: /${{matrix.sys}}/bin
           CARGO_TERM_COLOR: always

   asan:

... but then found msys2/MINGW-packages#23789 and msys2/MINGW-packages#23346 which might means that we should just remove mingw i686 from CI?

@messense
Copy link
Owner

Makes sense, let's drop it.

- Added round and intersect
- Allow for the fact that mupdf may return invalid rectangles (x1<x0 or y1<y0) in case of empty result
- Use mupdf C-library whenever possible (there is no union for fz_irect in mupdf-c)
@ginnyTheCat ginnyTheCat merged commit 44ef8f7 into messense:main Jun 28, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants