Class: Magick::TextureFill

Inherits:
Object
  • Object
show all
Defined in:
ext/RMagick/rmmain.c

Instance Method Summary collapse

Constructor Details

#initialize(texture_arg) ⇒ Object

Extern: TextureFill#initialize Purpose: Store the texture image



585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
# File 'ext/RMagick/rmfill.c', line 585

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

Extern: TextureFill_fill(image_obj) Purpose: the TextureFill#fill method



608
609
610
611
612
613
614
615
616
617
618
619
620
621
# File 'ext/RMagick/rmfill.c', line 608

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;
}