rmagick 2.2.2 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

Files changed (55) hide show
  1. data/ChangeLog +17 -0
  2. data/README.html +21 -46
  3. data/README.txt +18 -40
  4. data/build_tarball.rake +11 -2
  5. data/doc/comtasks.html +5 -5
  6. data/doc/constants.html +272 -241
  7. data/doc/draw.html +5 -5
  8. data/doc/ex/mask.rb +2 -2
  9. data/doc/ilist.html +9 -9
  10. data/doc/image1.html +164 -16
  11. data/doc/image2.html +105 -8
  12. data/doc/image3.html +8 -8
  13. data/doc/imageattrs.html +4 -137
  14. data/doc/imusage.html +3 -3
  15. data/doc/index.html +9 -9
  16. data/doc/info.html +5 -5
  17. data/doc/magick.html +30 -70
  18. data/doc/optequiv.html +19 -39
  19. data/doc/rvg.html +5 -5
  20. data/doc/rvgclip.html +2 -2
  21. data/doc/rvggroup.html +2 -2
  22. data/doc/rvgimage.html +3 -3
  23. data/doc/rvgpattern.html +3 -3
  24. data/doc/rvgshape.html +2 -2
  25. data/doc/rvgstyle.html +2 -2
  26. data/doc/rvgtext.html +6 -6
  27. data/doc/rvgtspan.html +4 -4
  28. data/doc/rvgtut.html +9 -9
  29. data/doc/rvguse.html +3 -3
  30. data/doc/rvgxform.html +2 -2
  31. data/doc/struct.html +54 -19
  32. data/doc/usage.html +11 -3
  33. data/ext/RMagick/MANIFEST +1 -1
  34. data/ext/RMagick/extconf.rb +8 -23
  35. data/ext/RMagick/rmagick.h +10 -5
  36. data/ext/RMagick/rmdraw.c +7 -8
  37. data/ext/RMagick/rmimage.c +186 -20
  38. data/ext/RMagick/rmmain.c +32 -12
  39. data/ext/RMagick/rmutil.c +171 -28
  40. data/lib/RMagick.rb +7 -7
  41. data/lib/rvg/clippath.rb +2 -2
  42. data/lib/rvg/container.rb +2 -2
  43. data/lib/rvg/describable.rb +2 -2
  44. data/lib/rvg/embellishable.rb +2 -2
  45. data/lib/rvg/misc.rb +2 -2
  46. data/lib/rvg/paint.rb +7 -2
  47. data/lib/rvg/pathdata.rb +2 -2
  48. data/lib/rvg/rvg.rb +3 -3
  49. data/lib/rvg/stretchable.rb +15 -3
  50. data/lib/rvg/stylable.rb +2 -2
  51. data/lib/rvg/text.rb +2 -2
  52. data/lib/rvg/transformable.rb +2 -2
  53. data/lib/rvg/units.rb +2 -2
  54. data/rmagick.gemspec +1 -1
  55. metadata +3 -3
data/doc/rvgxform.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.2.2: RVG Reference: Transforms</title>
9
+ <title>RMagick 2.3.0: RVG Reference: Transforms</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -28,7 +28,7 @@
28
28
  </head>
29
29
 
30
30
  <body>
31
- <h6 id="header">RMagick 2.2.2 User's Guide and Reference</h6>
31
+ <h6 id="header">RMagick 2.3.0 User's Guide and Reference</h6>
32
32
 
33
33
  <div class="nav">
34
34
  &laquo;&nbsp;<a href="rvgshape.html">Prev</a> | <a href=
data/doc/struct.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.2.2: Miscellaneous classes</title>
9
+ <title>RMagick 2.3.0: Miscellaneous classes</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -27,7 +27,7 @@
27
27
  </head>
28
28
 
29
29
  <body>
30
- <h6 id="header">RMagick 2.2.2 User's Guide and Reference</h6>
30
+ <h6 id="header">RMagick 2.3.0 User's Guide and Reference</h6>
31
31
 
32
32
  <div class="nav">
33
33
  &laquo;&nbsp;<a href="draw.html">Prev</a> | <a href=
@@ -132,7 +132,7 @@
132
132
  <p>The easiest way to use an <code>Image::View</code> object
133
133
  is to create it with the <a href=
134
134
  "image3.html#view">Image#view</a> method, which provides a
135
- block-scoped view and automatic sync'ing. You probably won't
135
+ block-scoped view and automatic syncing. You probably won't
136
136
  want to create a view by calling <code>new</code>.</p>
137
137
 
138
138
  <h5>Arguments</h5>
@@ -224,7 +224,7 @@
224
224
  pixels = view[3][]
225
225
  # Use arrays to specify a non-contiguous set of rows and columns
226
226
  pixels = view[[1,3,5]][[2,4,6]]
227
- # Use ranges to specify a contigous set of rows and columns
227
+ # Use ranges to specify a contiguous set of rows and columns
228
228
  pixels = view[1..5][2..6]
229
229
  </pre>
230
230
  </div>
@@ -414,8 +414,8 @@
414
414
 
415
415
  <p>The Geometry class contains the same information as an
416
416
  ImageMagick <a href="imusage.html#geometry">geometry
417
- string</a>. Geometry objects are interchangable with geometry
418
- strings.</p>
417
+ string</a>. Geometry objects are interchangeable with
418
+ geometry strings.</p>
419
419
  </div>
420
420
 
421
421
  <h3>class Geometry <span class="superclass">&lt;
@@ -578,7 +578,7 @@ g = Magick::Geometry.new(100,200,nil,nil,Magick::AspectGeometry)
578
578
  <h3>Introduction</h3>
579
579
 
580
580
  <p>A pixel describes the smallest individually addressable
581
- part of an image. In the RBG <a href=
581
+ part of an image. In the RGB <a href=
582
582
  "constants.html#ColorspaceType">colorspace</a>, a pixel's
583
583
  color is described by its intensity in the red, green, and
584
584
  blue channels. Its opacity is described by its intensity in
@@ -657,17 +657,44 @@ g = Magick::Geometry.new(100,200,nil,nil,Magick::AspectGeometry)
657
657
  </div>
658
658
 
659
659
  <div class="sig">
660
- <h4>from_HSL</h4>
660
+ <h4 id="from_hsla">from_hsla</h4>
661
661
 
662
- <p>Pixel.from_HSL(<span class="arg">[hue, saturation,
663
- luminosity]</span>) -&gt; <em>pixel</em></p>
662
+ <p>Pixel.from_hsla(<span class="arg">hue</span>, <span class=
663
+ "arg">saturation</span>, <span class="arg">lightness</span>,
664
+ <span class="arg">alpha</span>=1.0) -&gt; <em>pixel</em></p>
664
665
  </div>
665
666
 
666
667
  <div class="desc">
667
668
  <h5>Description</h5>
668
669
 
669
- <p>Constructs a pixel object from the specified array of 3
670
- values: hue, saturation, and luminosity.</p>
670
+ <p>Constructs a pixel object from the specified
671
+ arguments.</p>
672
+
673
+ <h5>Arguments</h5>
674
+
675
+ <dl>
676
+ <dt>hue</dt>
677
+
678
+ <dd>A value in the range [0.0, 360.0).</dd>
679
+
680
+ <dt>saturation</dt>
681
+
682
+ <dd>A value in the range [0.0, 100.0].</dd>
683
+
684
+ <dt>lightness</dt>
685
+
686
+ <dd>A value in the range 0.0, 100.0].</dd>
687
+
688
+ <dt>alpha</dt>
689
+
690
+ <dd>A value in the range [0.0, 1.0], where 1.0 is fully
691
+ opaque and 0.0 is fully transparent. This argument may be
692
+ omitted. The default is 1.0.</dd>
693
+ </dl>
694
+
695
+ <h5>See also</h5>
696
+
697
+ <p><a href="#to_hsla">to_hsla</a></p>
671
698
  </div>
672
699
 
673
700
  <div class="sig">
@@ -769,7 +796,8 @@ g = Magick::Geometry.new(100,200,nil,nil,Magick::AspectGeometry)
769
796
  <p><span class="arg">pixel</span>.to_color(<span class=
770
797
  "arg">compliance</span>=AllCompliance, <span class=
771
798
  "arg">matte</span>=<code>false</code>, <span class=
772
- "arg">depth</span>=<code>QuantumDepth</code>) -&gt;
799
+ "arg">depth</span>=<code>QuantumDepth</code>, <span class=
800
+ "arg">hex</span>=<code>false</code>) -&gt;
773
801
  <em>string</em></p>
774
802
  </div>
775
803
 
@@ -779,8 +807,7 @@ g = Magick::Geometry.new(100,200,nil,nil,Magick::AspectGeometry)
779
807
  <p>Returns the <a href="imusage.html#color_names">color
780
808
  name</a> corresponding the the pixel values. If there is no
781
809
  such named color in the specified color standard, returns a
782
- string in the form "#RRGGBBOO" or, if the depth is 16,
783
- "#RRRRGGGGBBBBOOOO".</p>
810
+ string in the form "rgb(r,g,b,a)".</p>
784
811
 
785
812
  <h5>Arguments</h5>
786
813
 
@@ -804,6 +831,12 @@ g = Magick::Geometry.new(100,200,nil,nil,Magick::AspectGeometry)
804
831
  when ImageMagick was compiled. The values 16 and 32 can be
805
832
  used only when ImageMagick was compiled with the
806
833
  appropriate QuantumDepth.</dd>
834
+
835
+ <dt>hex</dt>
836
+
837
+ <dd>If true, represent the color name in hex (#rrggbbaa or
838
+ #rrrrggggbbbbaaaa) format. In this case <span class=
839
+ "arg">compliance</span> is meaningless.</dd>
807
840
  </dl>
808
841
 
809
842
  <h5>See also</h5>
@@ -815,7 +848,7 @@ g = Magick::Geometry.new(100,200,nil,nil,Magick::AspectGeometry)
815
848
  </div>
816
849
 
817
850
  <div class="sig">
818
- <h4>to_HSL</h4>
851
+ <h4>to_hsla</h4>
819
852
 
820
853
  <p><span class="arg">pixel</span>.to_HSL -&gt;
821
854
  <em>array</em></p>
@@ -825,12 +858,14 @@ g = Magick::Geometry.new(100,200,nil,nil,Magick::AspectGeometry)
825
858
  <h5>Description</h5>
826
859
 
827
860
  <p>Converts the RGB representation of the pixel to hue,
828
- saturation, and luminosity values.</p>
861
+ saturation, lightness, and alpha values.</p>
829
862
 
830
863
  <h5>Returns</h5>
831
864
 
832
- <p>An array of the form <code>[hue, saturation,
833
- luminosity]</code>.</p>
865
+ <p>An array of the form <code>[hue, saturation, lightness,
866
+ alpha]</code>. Each value is in the range specified for it,
867
+ as described in <a href="#from_hsla">from_hsla</a>,
868
+ above.</p>
834
869
  </div>
835
870
  </div>
836
871
 
data/doc/usage.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.2.2: How to use RMagick</title>
9
+ <title>RMagick 2.3.0: How to use RMagick</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -90,7 +90,7 @@
90
90
  </head>
91
91
 
92
92
  <body>
93
- <h6 id="header">RMagick 2.2.2 User's Guide and Reference</h6>
93
+ <h6 id="header">RMagick 2.3.0 User's Guide and Reference</h6>
94
94
 
95
95
  <div class="nav">
96
96
  &laquo;&nbsp;<a href="index.html">Prev</a> | <a href=
@@ -148,7 +148,7 @@
148
148
  "#rubygems">2</a></span> the RMagick.rb file, which defines the
149
149
  <b>Magick</b> module. The Magick module contains 3 major classes,
150
150
  <b>ImageList</b>, <b>Image</b>, and <b>Draw</b>. This section -
151
- <em>Basic Comcepts</em> - describes the ImageList and Image
151
+ <em>Basic Concepts</em> - describes the ImageList and Image
152
152
  classes. The Draw class is explained in the <em><a href=
153
153
  "#drawing">Drawing on and adding text to images</a></em> section,
154
154
  below.</p>
@@ -901,6 +901,10 @@ exit
901
901
 
902
902
  <dd>Extract a region from the image</dd>
903
903
 
904
+ <dt><a href="image1.html#decipher">decipher</a></dt>
905
+
906
+ <dd>Convert enciphered pixels to plain pixels</dd>
907
+
904
908
  <dt class="ilist"><a href=
905
909
  "ilist.html#deconstruct">deconstruct</a></dt>
906
910
 
@@ -912,6 +916,10 @@ exit
912
916
 
913
917
  <dd>Distort the image</dd>
914
918
 
919
+ <dt><a href="image2.html#encipher">encipher</a></dt>
920
+
921
+ <dd>Encipher plain pixels</dd>
922
+
915
923
  <dt><a href="image2.html#excerpt">excerpt</a></dt>
916
924
 
917
925
  <dd>Excerpt a rectangle from the image</dd>
data/ext/RMagick/MANIFEST CHANGED
@@ -1,4 +1,4 @@
1
- MANIFEST for RMagick-2.2.2 - 19:34:24 02/12/08
1
+ MANIFEST for RMagick-2.3.0 - 11:46:46 03/29/08
2
2
 
3
3
  doc/ilist.html
4
4
  doc/scripts/stripeTables.js
@@ -1,7 +1,7 @@
1
1
  require "mkmf"
2
2
  require "date"
3
3
 
4
- RMAGICK_VERS = "2.2.2"
4
+ RMAGICK_VERS = "2.3.0"
5
5
  MIN_RUBY_VERS = "1.8.2"
6
6
  MIN_RUBY_VERS_NO = MIN_RUBY_VERS.tr(".","").to_i
7
7
  MIN_IM_VERS = "6.3.0"
@@ -29,25 +29,6 @@ end
29
29
 
30
30
 
31
31
 
32
- def have_new_rb_cvar_set(headers=nil, &b)
33
- checking_for "rb_cvar_set with 3 arguments" do
34
- if try_compile(<<"SRC", &b)
35
- #{COMMON_HEADERS}
36
- #{cpp_include(headers)}
37
- /*top*/
38
- int main() { rb_cvar_set(rb_cArray, rb_intern("x"), INT2FIX(0)); return 0; }
39
- SRC
40
- $defs.push("-DHAVE_NEW_RB_CVAR_SET")
41
- true
42
- else
43
- false
44
- end
45
- end
46
- end
47
-
48
-
49
-
50
-
51
32
  # Test for multiple values of the same enum type
52
33
  def have_enum_values(enum, values, headers=nil, &b)
53
34
  values.each do |value|
@@ -138,9 +119,9 @@ end
138
119
 
139
120
  if RUBY_PLATFORM !~ /mswin/
140
121
 
141
- unless have_library("Magick", "InitializeMagick", headers) || have_library("MagickCore", "InitializeMagick", headers)
122
+ unless have_library("Magick", "InitializeMagick", headers) || have_library("MagickCore", "InitializeMagick")
142
123
  exit_failure "Can't install RMagick #{RMAGICK_VERS}. " +
143
- "Can't find libMagick or one of the dependent libraries. " +
124
+ "Can't find libMagick or libMagickCore, or one of the dependent libraries. " +
144
125
  "Check the mkmf.log file for more detailed information.\n"
145
126
  end
146
127
  end
@@ -155,9 +136,11 @@ have_func("snprintf", headers)
155
136
  "ConvertHSLToRGB", # 6.3.5-9
156
137
  "ConvertRGBToHSL", # 6.3.5-9
157
138
  "DistortImage", # 6.3.5
139
+ "EncipherImage", # 6.3.8-6
158
140
  "EqualizeImageChannel", # 6.3.6-9
159
141
  "ExcerptImage", # 6.3.5-8
160
142
  "ExtentImage", # 6.3.1
143
+ "GetImageAlphaChannel", # 6.3.9-2
161
144
  "GetImageProperty", # 6.3.1
162
145
  "GetNextImageProperty", # 6.3.1
163
146
  "IsHistogramImage", # 6.3.5
@@ -194,6 +177,9 @@ have_enum_value("ColorspaceType", "CMYColorspace", headers) # 6
194
177
  have_enum_values("CompositeOperator", ["ChangeMaskCompositeOp", # 6.3.3
195
178
  "LinearLightCompositeOp", # 6.3.5
196
179
  "DivideCompositeOp"], headers) # 6.3.5
180
+ have_enum_values("CompressionType", ["DXT1Compression", # 6.3.9-3
181
+ "DXT3Compression", # 6.3.9-3
182
+ "DXT5Compression"], headers) # 6.3.9-3
197
183
  have_enum_values("DistortImageMethod", ["ArcDistortion", # 6.3.5-5
198
184
  "PerspectiveProjectionDistortion"], headers) # 6.3.5-9
199
185
  have_enum_values("FilterTypes", ["KaiserFilter", # 6.3.6
@@ -226,7 +212,6 @@ have_enum_values("VirtualPixelMethod", ["MaskVirtualPixelMethod", # 6
226
212
  # Now test Ruby 1.9.0 features.
227
213
  headers = ["ruby.h", "rubyio.h"]
228
214
  have_func("rb_frame_this_func", headers)
229
- have_new_rb_cvar_set(headers)
230
215
 
231
216
 
232
217
 
@@ -1,4 +1,4 @@
1
- /* $Id: rmagick.h,v 1.223 2008/01/28 22:31:50 rmagick Exp $ */
1
+ /* $Id: rmagick.h,v 1.231 2008/03/29 15:23:12 rmagick Exp $ */
2
2
  /*=============================================================================
3
3
  | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmagick.h
@@ -117,6 +117,7 @@
117
117
  #if !defined(RARRAY_LEN)
118
118
  #define RARRAY_LEN(a) RARRAY((a))->len
119
119
  #endif
120
+ // Matz says this macro is read-only! (see http://www.ruby-forum.com/topic/146072)
120
121
  #if !defined(RARRAY_PTR)
121
122
  #define RARRAY_PTR(a) RARRAY((a))->ptr
122
123
  #endif
@@ -310,12 +311,10 @@ EXTERN VALUE Class_VirtualPixelMethod;
310
311
  * Commonly-used IDs
311
312
  */
312
313
  EXTERN ID rm_ID_trace_proc; // "@trace_proc"
313
- EXTERN ID rm_ID__dummy_img_; // "_dummy_img_"
314
314
  EXTERN ID rm_ID_call; // "call"
315
315
  EXTERN ID rm_ID_changed; // "changed"
316
316
  EXTERN ID rm_ID_cur_image; // "cur_image"
317
317
  EXTERN ID rm_ID_dup; // "dup"
318
- EXTERN ID rm_ID_enumerators; // "enumerators"
319
318
  EXTERN ID rm_ID_fill; // "fill"
320
319
  EXTERN ID rm_ID_flag; // "flag"
321
320
  EXTERN ID rm_ID_from_s; // "from_s"
@@ -328,7 +327,6 @@ EXTERN ID rm_ID_notify_observers; // "notify_observers"
328
327
  EXTERN ID rm_ID_new; // "new"
329
328
  EXTERN ID rm_ID_push; // "push"
330
329
  EXTERN ID rm_ID_spaceship; // "<=>
331
- EXTERN ID rm_ID__tmpnam_; // "_tmpnam_"
332
330
  EXTERN ID rm_ID_to_i; // "to_i"
333
331
  EXTERN ID rm_ID_to_s; // "to_s"
334
332
  EXTERN ID rm_ID_values; // "values"
@@ -725,7 +723,7 @@ ATTR_READER(Image, image_type)
725
723
  ATTR_ACCESSOR(Image, interlace)
726
724
  ATTR_ACCESSOR(Image, iptc_profile)
727
725
  ATTR_ACCESSOR(Image, iterations)
728
- ATTR_ACCESSOR(Image, mask)
726
+ ATTR_WRITER(Image, mask)
729
727
  ATTR_ACCESSOR(Image, matte)
730
728
  ATTR_ACCESSOR(Image, matte_color)
731
729
  ATTR_READER(Image, mean_error_per_pixel)
@@ -769,6 +767,8 @@ extern VALUE Image_add_noise(VALUE, VALUE);
769
767
  extern VALUE Image_add_noise_channel(int, VALUE *, VALUE);
770
768
  extern VALUE Image_add_profile(VALUE, VALUE);
771
769
  extern VALUE Image_affine_transform(VALUE, VALUE);
770
+ extern VALUE Image_alpha(int, VALUE *, VALUE);
771
+ extern VALUE Image_alpha_q(VALUE);
772
772
  extern VALUE Image_aref(VALUE, VALUE);
773
773
  extern VALUE Image_aset(VALUE, VALUE, VALUE);
774
774
  extern VALUE Image_auto_orient(VALUE);
@@ -814,6 +814,7 @@ extern VALUE Image_copy(VALUE);
814
814
  extern VALUE Image_crop(int, VALUE *, VALUE);
815
815
  extern VALUE Image_crop_bang(int, VALUE *, VALUE);
816
816
  extern VALUE Image_cycle_colormap(VALUE, VALUE);
817
+ extern VALUE Image_decipher(VALUE, VALUE);
817
818
  extern VALUE Image_delete_profile(VALUE, VALUE);
818
819
  extern VALUE Image_despeckle(VALUE);
819
820
  extern VALUE Image_destroy_bang(VALUE);
@@ -830,6 +831,7 @@ extern VALUE Image_dup(VALUE);
830
831
  extern VALUE Image_each_profile(VALUE);
831
832
  extern VALUE Image_edge(int, VALUE *, VALUE);
832
833
  extern VALUE Image_emboss(int, VALUE *, VALUE);
834
+ extern VALUE Image_encipher(VALUE, VALUE);
833
835
  extern VALUE Image_enhance(VALUE);
834
836
  extern VALUE Image_equalize(VALUE);
835
837
  extern VALUE Image_equalize_channel(int, VALUE *, VALUE);
@@ -865,6 +867,7 @@ extern VALUE Image__load(VALUE, VALUE);
865
867
  extern VALUE Image_magnify(VALUE);
866
868
  extern VALUE Image_magnify_bang(VALUE);
867
869
  extern VALUE Image_map(int, VALUE *, VALUE);
870
+ extern VALUE Image_mask(int, VALUE *, VALUE);
868
871
  extern VALUE Image_matte_flood_fill(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
869
872
  extern VALUE Image_median_filter(int, VALUE *, VALUE);
870
873
  extern VALUE Image_minify(VALUE);
@@ -1010,6 +1013,7 @@ extern VALUE Pixel_eql_q(VALUE, VALUE);
1010
1013
  extern VALUE Pixel_fcmp(int, VALUE *, VALUE);
1011
1014
  extern VALUE Pixel_from_color(VALUE, VALUE);
1012
1015
  extern VALUE Pixel_from_HSL(VALUE, VALUE);
1016
+ extern VALUE Pixel_from_hsla(int, VALUE *, VALUE);
1013
1017
  extern VALUE Pixel_hash(VALUE);
1014
1018
  extern VALUE Pixel_initialize(int, VALUE *, VALUE);
1015
1019
  extern VALUE Pixel_init_copy(VALUE, VALUE);
@@ -1017,6 +1021,7 @@ extern VALUE Pixel_intensity(VALUE);
1017
1021
  extern VALUE Pixel_spaceship(VALUE, VALUE);
1018
1022
  extern VALUE Pixel_to_color(int, VALUE *, VALUE);
1019
1023
  extern VALUE Pixel_to_HSL(VALUE);
1024
+ extern VALUE Pixel_to_hsla(VALUE);
1020
1025
  extern VALUE Pixel_to_s(VALUE);
1021
1026
  extern VALUE PixelPacket_to_Color_Name(Image *, PixelPacket *);
1022
1027
  extern VALUE PixelPacket_to_Color_Name_Info(Info *, PixelPacket *);
data/ext/RMagick/rmdraw.c CHANGED
@@ -1,4 +1,4 @@
1
- /* $Id: rmdraw.c,v 1.61 2008/01/01 23:18:31 rmagick Exp $ */
1
+ /* $Id: rmdraw.c,v 1.62 2008/03/29 15:20:36 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmdraw.c
@@ -1192,6 +1192,7 @@ destroy_Montage(void *obj)
1192
1192
  if (montage->info && montage->info->texture != NULL)
1193
1193
  {
1194
1194
  rm_delete_temp_image(montage->info->texture);
1195
+ magick_free(montage->info->texture);
1195
1196
  montage->info->texture = NULL;
1196
1197
  }
1197
1198
  if (montage->info)
@@ -1261,6 +1262,7 @@ Montage_texture_eq(VALUE self, VALUE texture)
1261
1262
  // remove it now in preparation for this new one.
1262
1263
  if (montage->info->texture)
1263
1264
  {
1265
+ rm_delete_temp_image(montage->info->texture);
1264
1266
  magick_free(montage->info->texture);
1265
1267
  montage->info->texture = NULL;
1266
1268
  }
@@ -1403,11 +1405,12 @@ VALUE PolaroidOptions_border_color_eq(VALUE self, VALUE border)
1403
1405
 
1404
1406
  static VALUE get_dummy_tm_img(VALUE klass)
1405
1407
  {
1408
+ #define DUMMY_IMG_CLASS_VAR "@@_dummy_img_"
1406
1409
  volatile VALUE dummy_img = 0;
1407
1410
  Info *info;
1408
1411
  Image *image;
1409
1412
 
1410
- if (rb_cvar_defined(klass, rm_ID__dummy_img_) != Qtrue)
1413
+ if (rb_cvar_defined(klass, rb_intern(DUMMY_IMG_CLASS_VAR)) != Qtrue)
1411
1414
  {
1412
1415
 
1413
1416
  info = CloneImageInfo(NULL);
@@ -1423,13 +1426,9 @@ static VALUE get_dummy_tm_img(VALUE klass)
1423
1426
  (void) DestroyImageInfo(info);
1424
1427
  dummy_img = rm_image_new(image);
1425
1428
 
1426
- #if defined(HAVE_NEW_RB_CVAR_SET)
1427
- rb_cvar_set(klass, rm_ID__dummy_img_, dummy_img);
1428
- #else
1429
- rb_cvar_set(klass, rm_ID__dummy_img_, dummy_img, 0);
1430
- #endif
1429
+ rb_cv_set(klass, DUMMY_IMG_CLASS_VAR, dummy_img);
1431
1430
  }
1432
- dummy_img = rb_cvar_get(klass, rm_ID__dummy_img_);
1431
+ dummy_img = rb_cv_get(klass, DUMMY_IMG_CLASS_VAR);
1433
1432
 
1434
1433
  return dummy_img;
1435
1434
  }