Method: Magick::Image#swirl
- Defined in:
- ext/RMagick/rmimage.cpp
#swirl(degrees_obj) ⇒ Magick::Image
Swirl the pixels about the center of the image, where degrees indicates the sweep of the arc through which each pixel is moved. You get a more dramatic effect as the degrees move from 1 to 360.
14029 14030 14031 14032 14033 14034 14035 14036 14037 14038 14039 14040 14041 14042 14043 14044 14045 14046 14047 14048 14049 14050 |
# File 'ext/RMagick/rmimage.cpp', line 14029
VALUE
Image_swirl(VALUE self, VALUE degrees_obj)
{
Image *image, *new_image;
ExceptionInfo *exception;
double degrees = NUM2DBL(degrees_obj);
image = rm_check_destroyed(self);
exception = AcquireExceptionInfo();
#if defined(IMAGEMAGICK_7)
GVL_STRUCT_TYPE(SwirlImage) args = { image, degrees, image->interpolate, exception };
#else
GVL_STRUCT_TYPE(SwirlImage) args = { image, degrees, exception };
#endif
new_image = (Image *)CALL_FUNC_WITHOUT_GVL(GVL_FUNC(SwirlImage), &args);
rm_check_exception(exception, new_image, DestroyOnError);
DestroyExceptionInfo(exception);
return rm_image_new(new_image);
}
|