Method: Magick::Image#affine_transform
- Defined in:
- ext/RMagick/rmimage.cpp
#affine_transform(affine) ⇒ Magick::Image
Transform an image as dictated by the affine matrix argument.
938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 |
# File 'ext/RMagick/rmimage.cpp', line 938
VALUE
Image_affine_transform(VALUE self, VALUE affine)
{
Image *image, *new_image;
ExceptionInfo *exception;
AffineMatrix matrix;
image = rm_check_destroyed(self);
// Convert Magick::AffineMatrix to AffineMatrix structure.
Export_AffineMatrix(&matrix, affine);
exception = AcquireExceptionInfo();
GVL_STRUCT_TYPE(AffineTransformImage) args = { image, &matrix, exception };
void *ret = CALL_FUNC_WITHOUT_GVL(GVL_FUNC(AffineTransformImage), &args);
new_image = reinterpret_cast<decltype(new_image)>(ret);
rm_check_exception(exception, new_image, DestroyOnError);
DestroyExceptionInfo(exception);
return rm_image_new(new_image);
}
|