Diffstat (limited to 'bindings.rs')
-rw-r--r--bindings.rs52
1 files changed, 12 insertions, 40 deletions
diff --git a/bindings.rs b/bindings.rs
index d837115..f1af8e4 100644
--- a/bindings.rs
+++ b/bindings.rs
@@ -22,16 +22,6 @@ pub struct std_tuple {
pub _address: u8,
}
#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct std___uniq_ptr_impl {
- pub _M_t: std_tuple,
-}
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct std___uniq_ptr_impl__Ptr {
- pub _address: u8,
-}
-#[repr(C)]
#[derive(Debug)]
pub struct std_unique_ptr {
pub _M_t: u8,
@@ -75,22 +65,22 @@ extern "C" {
image: *const geometrize_Bitmap,
) -> geometrize_rgba;
}
-extern "C" {
- #[doc = " @brief scanlinesContainTransparentPixels Returns true if the scanlines contain transparent pixels in the given image\n @param scanlines The scanlines to check\n @param image The image whose pixels to check\n @param minAlpha The minimum alpha level (0-255) to consider transparent\n @return True if the scanlines contains any transparent pixels"]
- #[link_name = "\u{1}_ZN10geometrize10commonutil33scanlinesContainTransparentPixelsERKSt6vectorINS_8ScanlineESaIS2_EERKNS_6BitmapEi"]
- pub fn geometrize_commonutil_scanlinesContainTransparentPixels(
- scanlines: *const std_vector,
- image: *const geometrize_Bitmap,
- minAlpha: ::std::os::raw::c_int,
- ) -> bool;
+
+#[repr(C)]
+pub struct bounds {
+ min_x: i32,
+ min_y: i32,
+ max_x: i32,
+ max_y: i32,
}
+
extern "C" {
#[doc = " @brief mapShapeBoundsToImage Maps the given shape bound percentages to the given image, returning a bounding rectangle, or the whole image if the bounds were invalid\n @param The options to map to the image\n @param The image to map the options around\n @return The mapped shape bounds (xMin, yMin, xMax, yMax)"]
#[link_name = "\u{1}_ZN10geometrize10commonutil21mapShapeBoundsToImageERKNS_29ImageRunnerShapeBoundsOptionsERKNS_6BitmapE"]
pub fn geometrize_commonutil_mapShapeBoundsToImage(
options: *const geometrize_ImageRunnerShapeBoundsOptions,
image: *const geometrize_Bitmap,
- ) -> std_tuple;
+ ) -> bounds;
}
#[doc = " @brief The ShapeResult struct is a container for info about a shape added to the model.\n @author Sam Twidale (https://samcodes.co.uk/)"]
#[repr(C)]
@@ -108,7 +98,7 @@ pub struct geometrize_Bitmap {
#[doc = "< The height of the bitmap."]
pub m_height: ::std::os::raw::c_uint,
#[doc = "< The bitmap data."]
- pub m_data: std_vector,
+ pub m_data: *mut u8,
}
extern "C" {
#[doc = " @brief getWidth Gets the width of the bitmap."]
@@ -121,16 +111,6 @@ extern "C" {
pub fn geometrize_Bitmap_getHeight(this: *const geometrize_Bitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
- #[doc = " @brief copyData Gets a copy of the raw bitmap data.\n @return The bitmap data."]
- #[link_name = "\u{1}_ZNK10geometrize6Bitmap8copyDataEv"]
- pub fn geometrize_Bitmap_copyData(this: *const geometrize_Bitmap) -> std_vector;
-}
-extern "C" {
- #[doc = " @brief getDataRef Gets a reference to the raw bitmap data.\n @return The bitmap data."]
- #[link_name = "\u{1}_ZNK10geometrize6Bitmap10getDataRefEv"]
- pub fn geometrize_Bitmap_getDataRef(this: *const geometrize_Bitmap) -> *const std_vector;
-}
-extern "C" {
#[doc = " @brief getPixel Gets a pixel color value.\n @param x The x-coordinate of the pixel.\n @param y The y-coordinate of the pixel.\n @return The pixel RGBA color value."]
#[link_name = "\u{1}_ZNK10geometrize6Bitmap8getPixelEjj"]
pub fn geometrize_Bitmap_getPixel(
@@ -171,7 +151,7 @@ extern "C" {
this: *mut geometrize_Bitmap,
width: ::std::os::raw::c_uint,
height: ::std::os::raw::c_uint,
- data: *const std_vector,
+ data: *const u8,
);
}
impl geometrize_Bitmap {
@@ -184,14 +164,6 @@ impl geometrize_Bitmap {
geometrize_Bitmap_getHeight(self)
}
#[inline]
- pub unsafe fn copyData(&self) -> std_vector {
- geometrize_Bitmap_copyData(self)
- }
- #[inline]
- pub unsafe fn getDataRef(&self) -> *const std_vector {
- geometrize_Bitmap_getDataRef(self)
- }
- #[inline]
pub unsafe fn getPixel(
&self,
x: ::std::os::raw::c_uint,
@@ -226,7 +198,7 @@ impl geometrize_Bitmap {
pub unsafe fn new1(
width: ::std::os::raw::c_uint,
height: ::std::os::raw::c_uint,
- data: *const std_vector,
+ data: *const u8,
) -> Self {
let mut __bindgen_tmp = ::std::mem::MaybeUninit::uninit();
geometrize_Bitmap_Bitmap1(__bindgen_tmp.as_mut_ptr(), width, height, data);