Skip to content

Commit

Permalink
feat: add area function bindings
Browse files Browse the repository at this point in the history
Adds bindings for the functions:
* clipper_pathd_area
* clipper_path64_area
* clipper_pathsd_area
* clipper_paths64_area
  • Loading branch information
msvbg authored and tirithen committed May 29, 2024
1 parent 4eb737e commit cb2cb8a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fn main() {
.allowlist_function("clipper_pathd_simplify")
.allowlist_function("clipper_pathd_to_path64")
.allowlist_function("clipper_point_in_pathd")
.allowlist_function("clipper_pathd_area")
// PathsD Methods
.allowlist_function("clipper_pathsd_size")
.allowlist_function("clipper_pathsd")
Expand All @@ -86,6 +87,7 @@ fn main() {
.allowlist_function("clipper_pathsd_simplify")
.allowlist_function("clipper_pathsd_inflate")
.allowlist_function("clipper_pathsd_to_paths64")
.allowlist_function("clipper_pathsd_area")
// ClipperD Methods
.allowlist_function("clipper_clipperd_size")
.allowlist_function("clipper_clipperd")
Expand Down Expand Up @@ -125,6 +127,7 @@ fn main() {
.allowlist_function("clipper_path64_simplify")
.allowlist_function("clipper_path64_to_pathd")
.allowlist_function("clipper_point_in_path64")
.allowlist_function("clipper_path64_area")
// Paths64 Methods
.allowlist_function("clipper_paths64_size")
.allowlist_function("clipper_paths64")
Expand All @@ -139,6 +142,7 @@ fn main() {
.allowlist_function("clipper_paths64_simplify")
.allowlist_function("clipper_paths64_inflate")
.allowlist_function("clipper_paths64_to_pathsd")
.allowlist_function("clipper_paths64_area")
// ClipperD Methods
.allowlist_function("clipper_clipper64_size")
.allowlist_function("clipper_clipper64")
Expand Down
12 changes: 12 additions & 0 deletions generated/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,18 @@ extern "C" {
paths: *mut ClipperPathsD,
) -> *mut ClipperPaths64;
}
extern "C" {
pub fn clipper_pathd_area(path: *mut ClipperPathD) -> f64;
}
extern "C" {
pub fn clipper_path64_area(path: *mut ClipperPath64) -> f64;
}
extern "C" {
pub fn clipper_pathsd_area(paths: *mut ClipperPathsD) -> f64;
}
extern "C" {
pub fn clipper_paths64_area(paths: *mut ClipperPaths64) -> f64;
}
extern "C" {
pub fn clipper_point_in_path64(
path: *mut ClipperPath64,
Expand Down

0 comments on commit cb2cb8a

Please sign in to comment.