Merge pull request #97 from MaksRawski/my-changes
Add bindings for `DrawRectangle` and `MagickBrightnessContrastImage` methods
This commit is contained in:
@ -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!(
|
string_set_get!(
|
||||||
get_font, set_font, DrawGetFont, DrawSetFont
|
get_font, set_font, DrawGetFont, DrawSetFont
|
||||||
get_font_family, set_font_family, DrawGetFontFamily, DrawSetFontFamily
|
get_font_family, set_font_family, DrawGetFontFamily, DrawSetFontFamily
|
||||||
|
|||||||
@ -986,12 +986,15 @@ impl MagickWand {
|
|||||||
MagickTransformImageColorspace => transform_image_colorspace(
|
MagickTransformImageColorspace => transform_image_colorspace(
|
||||||
colorspace: bindings::ColorspaceType)
|
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)
|
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)
|
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.
|
/// Set the image alpha channel mode.
|
||||||
MagickSetImageAlphaChannel => set_image_alpha_channel(
|
MagickSetImageAlphaChannel => set_image_alpha_channel(
|
||||||
alpha_channel: bindings::AlphaChannelOption)
|
alpha_channel: bindings::AlphaChannelOption)
|
||||||
|
|||||||
Reference in New Issue
Block a user