Class: Magick::Image::PolaroidOptions

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

Instance Method Summary collapse

Constructor Details

#initializeObject

Method: Magick::PolaroidOptions#initialize Purpose: Yield to an optional block



1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
# File 'ext/RMagick/rmdraw.c', line 1290

VALUE
PolaroidOptions_initialize(VALUE self)
{
    Draw *draw;
    ExceptionInfo exception;

    // Default shadow color
    Data_Get_Struct(self, Draw, draw);

    GetExceptionInfo(&exception);
    (void) QueryColorDatabase("gray75", &draw->shadow_color, &exception);
    CHECK_EXCEPTION()
    (void) QueryColorDatabase("#dfdfdf", &draw->info->border_color, &exception);

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