Class: Magick::ImageList::Montage

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

Instance Method Summary collapse

Constructor Details

#initializeMagick::ImageList::Montage

Initialize a Montage object. Does nothing currently.



306
307
308
309
310
311
# File 'ext/RMagick/rmmontage.cpp', line 306

VALUE
Montage_initialize(VALUE self)
{
    // Nothing to do!
    return self;
}

Instance Method Details

#background_color=(color) ⇒ Magick::Pixel, String

Set background_color value.



117
118
119
120
121
122
123
124
125
# File 'ext/RMagick/rmmontage.cpp', line 117

VALUE
Montage_background_color_eq(VALUE self, VALUE color)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    Color_to_PixelColor(&montage->info->background_color, color);
    return color;
}

#border_color=(color) ⇒ Magick::Pixel, String

Set border_color value.



134
135
136
137
138
139
140
141
142
# File 'ext/RMagick/rmmontage.cpp', line 134

VALUE
Montage_border_color_eq(VALUE self, VALUE color)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    Color_to_PixelColor(&montage->info->border_color, color);
    return color;
}

#border_width=(width) ⇒ Numeric

Set border_width value.



151
152
153
154
155
156
157
158
159
# File 'ext/RMagick/rmmontage.cpp', line 151

VALUE
Montage_border_width_eq(VALUE self, VALUE width)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    montage->info->border_width = NUM2ULONG(width);
    return width;
}

#compose=(compose) ⇒ Magick::CompositeOperator

Set a composition operator.



168
169
170
171
172
173
174
175
176
# File 'ext/RMagick/rmmontage.cpp', line 168

VALUE
Montage_compose_eq(VALUE self, VALUE compose)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    VALUE_TO_ENUM(compose, montage->compose, CompositeOperator);
    return compose;
}

#filename=(filename) ⇒ String

Set filename value.



185
186
187
188
189
190
191
192
193
# File 'ext/RMagick/rmmontage.cpp', line 185

VALUE
Montage_filename_eq(VALUE self, VALUE filename)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    strlcpy(montage->info->filename, StringValueCStr(filename), sizeof(montage->info->filename));
    return filename;
}

#fill=(color) ⇒ Magick::Pixel, String

Set fill value.



202
203
204
205
206
207
208
209
210
# File 'ext/RMagick/rmmontage.cpp', line 202

VALUE
Montage_fill_eq(VALUE self, VALUE color)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    Color_to_PixelColor(&montage->info->fill, color);
    return color;
}

#font=(font) ⇒ String

Set font value.



219
220
221
222
223
224
225
226
227
228
# File 'ext/RMagick/rmmontage.cpp', line 219

VALUE
Montage_font_eq(VALUE self, VALUE font)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    magick_clone_string(&montage->info->font, StringValueCStr(font));

    return font;
}

#frame=(frame_arg) ⇒ Object

Set frame value.

  • The geometry is a string in the form:

    <width>x<height>+<outer-bevel-width>+<inner-bevel-width>
    

    or a Geometry object



241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'ext/RMagick/rmmontage.cpp', line 241

VALUE
Montage_frame_eq(VALUE self, VALUE frame_arg)
{
    Montage *montage;
    VALUE frame;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    frame = rb_String(frame_arg);
    magick_clone_string(&montage->info->frame, StringValueCStr(frame));

    RB_GC_GUARD(frame);

    return frame_arg;
}

#freezeObject

Overrides freeze in classes that can’t be frozen.

No Ruby usage (internal function)

Raises:

  • (TypeError)


309
310
311
312
313
# File 'ext/RMagick/rmutil.cpp', line 309

VALUE
rm_no_freeze(VALUE obj)
{
    rb_raise(rb_eTypeError, "can't freeze %s", rb_class2name(CLASS_OF(obj)));
}

#geometry=(geometry_arg) ⇒ String

Set geometry value.

  • The geometry is a string in the form:

    <width>x<height>+<outer-bevel-width>+<inner-bevel-width>
    

    or a Geometry object



268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'ext/RMagick/rmmontage.cpp', line 268

VALUE
Montage_geometry_eq(VALUE self, VALUE geometry_arg)
{
    Montage *montage;
    VALUE geometry;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    geometry = rb_String(geometry_arg);
    magick_clone_string(&montage->info->geometry, StringValueCStr(geometry));

    RB_GC_GUARD(geometry);

    return geometry_arg;
}

#gravity=(gravity) ⇒ Magick::GravityType

Set gravity value.



290
291
292
293
294
295
296
297
298
# File 'ext/RMagick/rmmontage.cpp', line 290

VALUE
Montage_gravity_eq(VALUE self, VALUE gravity)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    VALUE_TO_ENUM(gravity, montage->info->gravity, GravityType);
    return gravity;
}

#matte_color=(color) ⇒ Magick::Pixel, String

Set matte_color value.



320
321
322
323
324
325
326
327
328
# File 'ext/RMagick/rmmontage.cpp', line 320

VALUE
Montage_matte_color_eq(VALUE self, VALUE color)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    Color_to_PixelColor(&montage->info->matte_color, color);
    return color;
}

#pointsize=(size) ⇒ Numeric

Set pointsize value.



337
338
339
340
341
342
343
344
345
# File 'ext/RMagick/rmmontage.cpp', line 337

VALUE
Montage_pointsize_eq(VALUE self, VALUE size)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    montage->info->pointsize = NUM2DBL(size);
    return size;
}

#shadow=(shadow) ⇒ Bool

Set shadow value.



354
355
356
357
358
359
360
361
362
# File 'ext/RMagick/rmmontage.cpp', line 354

VALUE
Montage_shadow_eq(VALUE self, VALUE shadow)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    montage->info->shadow = (MagickBooleanType) RTEST(shadow);
    return shadow;
}

#stroke=(color) ⇒ Magick::Pixel, String

Set stroke value.



371
372
373
374
375
376
377
378
379
# File 'ext/RMagick/rmmontage.cpp', line 371

VALUE
Montage_stroke_eq(VALUE self, VALUE color)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    Color_to_PixelColor(&montage->info->stroke, color);
    return color;
}

#texture=(texture) ⇒ Magick::Image

Set texture value.



389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'ext/RMagick/rmmontage.cpp', line 389

VALUE
Montage_texture_eq(VALUE self, VALUE texture)
{
    Montage *montage;
    Image *texture_image;
    char temp_name[MaxTextExtent];

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);

    // If we had a previously defined temp texture image,
    // remove it now in preparation for this new one.
    if (montage->info->texture)
    {
        rm_delete_temp_image(montage->info->texture);
        magick_free(montage->info->texture);
        montage->info->texture = NULL;
    }

    texture = rm_cur_image(texture);
    texture_image = rm_check_destroyed(texture);

    // Write a temp copy of the image & save its name.
    rm_write_temp_image(texture_image, temp_name, sizeof(temp_name));
    magick_clone_string(&montage->info->texture, temp_name);

    return texture;
}

#tile=(tile_arg) ⇒ String

Set tile value.

  • The geometry is a string in the form:

    <width>x<height>+<outer-bevel-width>+<inner-bevel-width>
    

    or a Geometry object



429
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'ext/RMagick/rmmontage.cpp', line 429

VALUE
Montage_tile_eq(VALUE self, VALUE tile_arg)
{
    Montage *montage;
    VALUE tile;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    tile = rb_String(tile_arg);
    magick_clone_string(&montage->info->tile, StringValueCStr(tile));

    RB_GC_GUARD(tile);

    return tile_arg;
}

#title=(title) ⇒ String

Set title value.



451
452
453
454
455
456
457
458
459
# File 'ext/RMagick/rmmontage.cpp', line 451

VALUE
Montage_title_eq(VALUE self, VALUE title)
{
    Montage *montage;

    TypedData_Get_Struct(self, Montage, &rm_montage_data_type, montage);
    magick_clone_string(&montage->info->title, StringValueCStr(title));
    return title;
}