Class: Magick::TextureFill
- Inherits:
-
Object
- Object
- Magick::TextureFill
- Defined in:
- ext/RMagick/rmmain.c
Instance Method Summary collapse
-
#fill(image_obj) ⇒ Magick::TextureFill
Call TextureFill with the texture specified when this fill object was created.
-
#initialize(texture_arg) ⇒ Magick::TextureFill
constructor
Initialize TextureFill object.
Constructor Details
#initialize(texture_arg) ⇒ Magick::TextureFill
Initialize TextureFill object.
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'ext/RMagick/rmfill.c', line 696
VALUE
TextureFill_initialize(VALUE self, VALUE texture_arg)
{
rm_TextureFill *fill;
Image *texture;
VALUE texture_image;
Data_Get_Struct(self, rm_TextureFill, fill);
texture_image = rm_cur_image(texture_arg);
// Bump the reference count on the texture image.
texture = rm_check_destroyed(texture_image);
ReferenceImage(texture);
fill->texture = texture;
RB_GC_GUARD(texture_image);
return self;
}
|
Instance Method Details
#fill(image_obj) ⇒ Magick::TextureFill
Call TextureFill with the texture specified when this fill object was created.
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 |
# File 'ext/RMagick/rmfill.c', line 725
VALUE
TextureFill_fill(VALUE self, VALUE image_obj)
{
rm_TextureFill *fill;
Image *image;
#if defined(IMAGEMAGICK_7)
ExceptionInfo *exception;
#endif
image = rm_check_destroyed(image_obj);
Data_Get_Struct(self, rm_TextureFill, fill);
#if defined(IMAGEMAGICK_7)
exception = AcquireExceptionInfo();
TextureImage(image, fill->texture, exception);
CHECK_EXCEPTION();
DestroyExceptionInfo(exception);
#else
TextureImage(image, fill->texture);
rm_check_image_exception(image, RetainOnError);
#endif
return self;
}
|