Class: Magick::Image::PolaroidOptions

Inherits:
Object
  • Object
show all
Includes:
DrawAttribute
Defined in:
ext/RMagick/rmmain.cpp

Instance Method Summary collapse

Methods included from DrawAttribute

#affine=, #align=, #decorate=, #density=, #encoding=, #fill=, #fill_pattern=, #font=, #font_family=, #font_stretch=, #font_style=, #font_weight=, #gravity=, #interline_spacing=, #interword_spacing=, #kerning=, #pointsize=, #rotation=, #stroke=, #stroke_pattern=, #stroke_width=, #text_antialias=, #tile=, #undercolor=

Constructor Details

#initializeObject



1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
# File 'ext/RMagick/rmdraw.cpp', line 1479

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

    // Default shadow color
    draw = get_draw(self);

    exception = AcquireExceptionInfo();
    QueryColorCompliance("gray75", AllCompliance, &draw->shadow_color, exception);
    CHECK_EXCEPTION();
    QueryColorCompliance("#dfdfdf", AllCompliance, &draw->info->border_color, exception);
    CHECK_EXCEPTION();
    DestroyExceptionInfo(exception);

    if (rb_block_given_p())
    {
        rb_yield(self);
    }

    return self;
}

Instance Method Details

#border_color=(border) ⇒ Object



1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
# File 'ext/RMagick/rmdraw.cpp', line 1542

VALUE
PolaroidOptions_border_color_eq(VALUE self, VALUE border)
{
    Draw *draw;

    rb_check_frozen(self);
    draw = get_draw(self);
    Color_to_PixelColor(&draw->info->border_color, border);
    return border;
}

#shadow_color=(shadow) ⇒ Magick::Pixel, String

Set the shadow color attribute.

Parameters:

Returns:



1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
# File 'ext/RMagick/rmdraw.cpp', line 1524

VALUE
PolaroidOptions_shadow_color_eq(VALUE self, VALUE shadow)
{
    Draw *draw;

    rb_check_frozen(self);
    TypedData_Get_Struct(self, Draw, &rm_draw_data_type, draw);
    Color_to_PixelColor(&draw->shadow_color, shadow);
    return shadow;
}