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
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'ext/RMagick/rmfill.c', line 623 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); (void) ReferenceImage(texture); fill->texture = texture; RB_GC_GUARD(texture_image); 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
656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'ext/RMagick/rmfill.c', line 656 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; } |