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

#initialize {|opt| ... } ⇒ Magick::Image::PolaroidOptions

Initialize a PolaroidOptions object.

Yields:

  • (opt)

Yield Parameters:



1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
# File 'ext/RMagick/rmdraw.cpp', line 1470

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

    // Default shadow color
    TypedData_Get_Struct(self, Draw, &rm_draw_data_type, draw);

    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) ⇒ Magick::Pixel, String

Set the border color.

Parameters:

Returns:



1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
# File 'ext/RMagick/rmdraw.cpp', line 1533

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

    rb_check_frozen(self);
    TypedData_Get_Struct(self, Draw, &rm_draw_data_type, draw);
    Color_to_PixelColor(&draw->info->border_color, border);
    return border;
}

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

Set the shadow color attribute.

Parameters:

Returns:



1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
# File 'ext/RMagick/rmdraw.cpp', line 1515

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;
}