Class: Magick::Image::DrawOptions
- Inherits:
-
Object
- Object
- Magick::Image::DrawOptions
- Defined in:
- ext/RMagick/rmmain.c
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Object
constructor
Method: DrawOptions#initialize Purpose: Initialize a DrawOptions object.
Constructor Details
#initialize ⇒ Object
Method: DrawOptions#initialize Purpose: Initialize a DrawOptions object
919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 |
# File 'ext/RMagick/rmdraw.c', line 919
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;
}
|