Class: Magick::ImageList::Montage

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

Instance Method Summary collapse

Constructor Details

#initializeMagick::ImageList::Montage

Initialize a Montage object. Does nothing currently.



285
286
287
288
289
290
# File 'ext/RMagick/rmmontage.c', line 285

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

Instance Method Details

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

Set background_color value.

Parameters:

Returns:



96
97
98
99
100
101
102
103
104
# File 'ext/RMagick/rmmontage.c', line 96

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

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

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

Set border_color value.

Parameters:

Returns:



113
114
115
116
117
118
119
120
121
# File 'ext/RMagick/rmmontage.c', line 113

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

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

#border_width=(width) ⇒ Numeric

Set border_width value.

Parameters:

  • width (Numeric)

    the width

Returns:

  • (Numeric)

    the given width



130
131
132
133
134
135
136
137
138
# File 'ext/RMagick/rmmontage.c', line 130

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

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

#compose=(compose) ⇒ Magick::CompositeOperator

Set a composition operator.

Parameters:

  • compose (Magick::CompositeOperator)

    the composition operator

Returns:

  • (Magick::CompositeOperator)

    the given compose operator



147
148
149
150
151
152
153
154
155
# File 'ext/RMagick/rmmontage.c', line 147

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

    Data_Get_Struct(self, Montage, montage);
    VALUE_TO_ENUM(compose, montage->compose, CompositeOperator);
    return compose;
}

#filename=(filename) ⇒ String

Set filename value.

Parameters:

  • filename (String)

    the filename

Returns:

  • (String)

    filename



164
165
166
167
168
169
170
171
172
# File 'ext/RMagick/rmmontage.c', line 164

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

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

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

Set fill value.

Parameters:

Returns:



181
182
183
184
185
186
187
188
189
# File 'ext/RMagick/rmmontage.c', line 181

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

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

#font=(font) ⇒ String

Set font value.

Parameters:

  • font (String)

    the font name

Returns:

  • (String)

    the given font name



198
199
200
201
202
203
204
205
206
207
# File 'ext/RMagick/rmmontage.c', line 198

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

    Data_Get_Struct(self, Montage, 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

Parameters:

  • frame_arg (String)

    the frame geometry

See Also:



220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'ext/RMagick/rmmontage.c', line 220

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

    Data_Get_Struct(self, Montage, 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)


306
307
308
309
310
# File 'ext/RMagick/rmutil.c', line 306

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

Parameters:

  • geometry_arg (String)

    the geometry

Returns:

  • (String)

    the given geometry

See Also:



247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'ext/RMagick/rmmontage.c', line 247

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

    Data_Get_Struct(self, Montage, 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.

Parameters:

  • gravity (Magick::GravityType)

    the gravity type

Returns:

  • (Magick::GravityType)

    the given gravity



269
270
271
272
273
274
275
276
277
# File 'ext/RMagick/rmmontage.c', line 269

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

    Data_Get_Struct(self, Montage, montage);
    VALUE_TO_ENUM(gravity, montage->info->gravity, GravityType);
    return gravity;
}

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

Set matte_color value.

Parameters:

Returns:



299
300
301
302
303
304
305
306
307
# File 'ext/RMagick/rmmontage.c', line 299

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

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

#pointsize=(size) ⇒ Numeric

Set pointsize value.

Parameters:

  • size (Numeric)

    the point size

Returns:

  • (Numeric)

    the given point size



316
317
318
319
320
321
322
323
324
# File 'ext/RMagick/rmmontage.c', line 316

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

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

#shadow=(shadow) ⇒ Bool

Set shadow value.

Parameters:

  • shadow (Bool)

    true if the shadow will be enabled

Returns:

  • (Bool)

    the given value



333
334
335
336
337
338
339
340
341
# File 'ext/RMagick/rmmontage.c', line 333

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

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

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

Set stroke value.

Parameters:

Returns:



350
351
352
353
354
355
356
357
358
# File 'ext/RMagick/rmmontage.c', line 350

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

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

#texture=(texture) ⇒ Magick::Image

Set texture value.

Parameters:

Returns:



368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
# File 'ext/RMagick/rmmontage.c', line 368

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

    Data_Get_Struct(self, Montage, 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

Parameters:

  • tile_arg (String)

    the tile geometry

Returns:

  • (String)

    the given tile geometry

See Also:



408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'ext/RMagick/rmmontage.c', line 408

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

    Data_Get_Struct(self, Montage, 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.

Parameters:

  • title (String)

    the title

Returns:

  • (String)

    the given title



430
431
432
433
434
435
436
437
438
# File 'ext/RMagick/rmmontage.c', line 430

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

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