Class: Magick::Image::DrawOptions
- Inherits:
-
Object
- Object
- Magick::Image::DrawOptions
- Defined in:
- ext/RMagick/rmmain.c
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
1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 |
# File 'ext/RMagick/rmdraw.c', line 1397
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;
}
|