Class: Magick::Image::DrawOptions

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Method: DrawOptions#initialize Purpose: Initialize a DrawOptions object



917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
# File 'ext/RMagick/rmdraw.c', line 917

VALUE DrawOptions_initialize(VALUE self)
{
    Draw *draw_options;

    Data_Get_Struct(self, Draw, draw_options);
    draw_options->info = magick_malloc(sizeof(DrawInfo));
    if (!draw_options->info)
    {
        rb_raise(rb_eNoMemError, "not enough memory to continue");
    }

    GetDrawInfo(NULL, draw_options->info);

    if (rb_block_given_p())
    {
        // Run the block in self's context
        (void) rb_obj_instance_eval(0, NULL, self);
    }

    return self;
}

Class Method Details

.newObject