Class: Magick::TextureFill
- Inherits:
-
Object
- Object
- Magick::TextureFill
- Defined in:
- ext/RMagick/rmmain.c
Instance Method Summary collapse
-
#fill(image_obj) ⇒ Object
Call TextureFill with the texture specified when this fill object was created.
-
#initialize(texture_arg) ⇒ Object
constructor
Store the texture image.
Constructor Details
#initialize(texture_arg) ⇒ Object
Store the texture image.
Ruby usage:
- @verbatim TextureFill#initialize(texture) @endverbatim
Notes:
- The texture is an Image or Image *object
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File 'ext/RMagick/rmfill.c', line 673
VALUE
TextureFill_initialize(VALUE self, VALUE texture_arg)
{
rm_TextureFill *fill;
Image *texture;
volatile 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);
(void) ReferenceImage(texture);
fill->texture = texture;
return self;
}
|
Instance Method Details
#fill(image_obj) ⇒ Object
Call TextureFill with the texture specified when this fill object was created.
Ruby usage:
- @verbatim TextureFill#fill(image) @endverbatim
703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'ext/RMagick/rmfill.c', line 703
VALUE
TextureFill_fill(VALUE self, VALUE image_obj)
{
rm_TextureFill *fill;
Image *image;
image = rm_check_destroyed(image_obj);
Data_Get_Struct(self, rm_TextureFill, fill);
(void) TextureImage(image, fill->texture);
rm_check_image_exception(image, RetainOnError);
return self;
}
|