Class: Magick::Image::PolaroidOptions

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

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



1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
# File 'ext/RMagick/rmdraw.c', line 1349

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()

    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



1333
1334
1335
1336
1337
1338
1339
1340
1341
# File 'ext/RMagick/rmdraw.c', line 1333

VALUE PolaroidOptions_new(VALUE class)
{
    volatile VALUE polaroid_obj;

    polaroid_obj = PolaroidOptions_alloc(class);
    rb_obj_call_init(polaroid_obj, 0, NULL);

    return polaroid_obj;
}