Binding for set_background_color

This commit is contained in:
Magic Len
2019-05-29 15:03:17 +08:00
parent 122f144ecb
commit 089e6fcb90
3 changed files with 28 additions and 0 deletions

View File

@ -437,6 +437,15 @@ impl MagickWand {
}
}
/// Set the background color.
pub fn set_background_color(&self, pixel_wand: &PixelWand) -> Result<(), &'static str> {
match unsafe { bindings::MagickSetBackgroundColor(self.wand, pixel_wand.wand) } {
bindings::MagickBooleanType_MagickTrue => Ok(()),
_ => Err("SetBackgroundColor returned false"),
}
}
/// Set the image background color.
pub fn set_image_background_color(&self, pixel_wand: &PixelWand) -> Result<(), &'static str> {
match unsafe { bindings::MagickSetImageBackgroundColor(self.wand, pixel_wand.wand) } {