Method: Magick::Image#composite_affine
- Defined in:
- ext/RMagick/rmimage.cpp
#composite_affine(source, affine_matrix) ⇒ Magick::Image
Composite the source over the destination image as dictated by the affine transform.
3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 |
# File 'ext/RMagick/rmimage.cpp', line 3799
VALUE
Image_composite_affine(VALUE self, VALUE source, VALUE affine_matrix)
{
Image *image, *composite_image, *new_image;
AffineMatrix affine;
#if defined(IMAGEMAGICK_7)
ExceptionInfo *exception;
#endif
image = rm_check_destroyed(self);
composite_image = rm_check_destroyed(rm_cur_image(source));
Export_AffineMatrix(&affine, affine_matrix);
new_image = rm_clone_image(image);
#if defined(IMAGEMAGICK_7)
exception = AcquireExceptionInfo();
GVL_STRUCT_TYPE(DrawAffineImage) args = { new_image, composite_image, &affine, exception };
CALL_FUNC_WITHOUT_GVL(GVL_FUNC(DrawAffineImage), &args);
rm_check_exception(exception, new_image, DestroyOnError);
DestroyExceptionInfo(exception);
#else
GVL_STRUCT_TYPE(DrawAffineImage) args = { new_image, composite_image, &affine };
CALL_FUNC_WITHOUT_GVL(GVL_FUNC(DrawAffineImage), &args);
rm_check_image_exception(new_image, DestroyOnError);
#endif
return rm_image_new(new_image);
}
|