use autocxx::c_int;
use depthai_sys::depthai;
use crate::error::clear_error_flag;
#[crate::native_node_wrapper(
native = "dai::node::ImageAlign",
inputs(inputConfig, input, inputAlignTo),
outputs(outputAligned, passthroughInput)
)]
pub struct ImageAlignNode {
node: crate::pipeline::Node,
}
impl ImageAlignNode {
pub fn set_run_on_host(&self, run_on_host: bool) {
clear_error_flag();
unsafe { depthai::dai_image_align_set_run_on_host(self.node.handle(), run_on_host) };
}
pub fn set_output_size(&self, width: i32, height: i32) {
clear_error_flag();
unsafe { depthai::dai_image_align_set_output_size(self.node.handle(), c_int(width), c_int(height)) };
}
pub fn set_out_keep_aspect_ratio(&self, keep: bool) {
clear_error_flag();
unsafe { depthai::dai_image_align_set_out_keep_aspect_ratio(self.node.handle(), keep) };
}
}