Merge pull request #97 from MaksRawski/my-changes

Add bindings for `DrawRectangle` and `MagickBrightnessContrastImage` methods
This commit is contained in:
Nathan Fiedler
2022-12-10 10:44:25 -08:00
committed by GitHub
2 changed files with 23 additions and 2 deletions

View File

@ -51,6 +51,24 @@ impl DrawingWand {
}
}
pub fn draw_rectangle(
&mut self,
upper_left_x: f64,
upper_left_y: f64,
lower_right_x: f64,
lower_right_y: f64,
) {
unsafe {
bindings::DrawRectangle(
self.wand,
upper_left_x,
upper_left_y,
lower_right_x,
lower_right_y,
);
}
}
string_set_get!(
get_font, set_font, DrawGetFont, DrawSetFont
get_font_family, set_font_family, DrawGetFontFamily, DrawSetFontFamily

View File

@ -986,12 +986,15 @@ impl MagickWand {
MagickTransformImageColorspace => transform_image_colorspace(
colorspace: bindings::ColorspaceType)
// Sets the image to the specified alpha level.
/// Sets the image to the specified alpha level.
MagickSetImageAlpha => set_image_alpha(alpha: f64)
// Control the brightness, saturation, and hue of an image
/// Control the brightness, saturation, and hue of an image
MagickModulateImage => modulate_image(brightness: f64, saturation: f64, hue: f64)
/// Control the brightness and contrast
MagickBrightnessContrastImage => brightness_contrast_image(brightness: f64, contrast: f64)
/// Set the image alpha channel mode.
MagickSetImageAlphaChannel => set_image_alpha_channel(
alpha_channel: bindings::AlphaChannelOption)