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:



1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
# File 'ext/RMagick/rmdraw.cpp', line 1489

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

Set the border color.

Parameters:

Returns:



1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
# File 'ext/RMagick/rmdraw.cpp', line 1552

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:



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

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