Permalink
Browse files

Document new Image#paint_transparent, #opacity_channel methods availa…

…ble in 6.3.7-10.
  • Loading branch information...
1 parent 9622e98 commit 130bcd2538f819a7f56e4ed6b4174eb500343de9 rmagick committed Jan 17, 2008
Showing with 180 additions and 32 deletions.
  1. +74 −8 doc/image2.html
  2. +84 −17 doc/image3.html
  3. +17 −5 doc/optequiv.html
  4. +5 −2 doc/usage.html
View
82 doc/image2.html
@@ -199,6 +199,8 @@ <h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
<li><a href="#opaque">opaque</a></li>
+ <li><a href="#opaque_channel">opaque_channel</a></li>
+
<li><a href="#opaque_q">opaque?</a></li>
<li><a href="#ordered_dither">ordered_dither</a></li>
@@ -989,14 +991,15 @@ <h3 id="frame">frame</h3>
<p class="rollover"><a href=
"javascript:popup('frame.rb.html')">
- <!-- This img tag displays the original image when the mouse is over -->
+ <!-- This img tag displays the original image when moused over -->
<img style="padding:25px; display:none" id="frameless"
onmouseout="this.style.display='none';framed.style.display='';"
src="ex/images/Flower_Hat.jpg" alt="frame example" title=
- "Click to see the example script" /><!--
- This img tag displays the framed image when the mouse is not over
- --><img onmouseover="this.style.display='none';frameless.style.display='';"
- src="ex/frame.jpg" alt="frame example" /></a> <img src=
+ "Click to see the example script" />
+ <!-- This img tag displays the framed image when the mouse is not over -->
+ <img onmouseover=
+ "this.style.display='none';frameless.style.display='';" src=
+ "ex/frame.jpg" alt="frame example" /></a> <img src=
"ex/images/spin.gif" alt="" style="margin-bottom: 280px" title=
"Mouse over the example to see the original image" /></p>
@@ -3147,12 +3150,75 @@ <h3 id="opaque">opaque</h3>
<h4>See also</h4>
- <p><a href=
- "image1.html#color_floodfill">color_floodfill</a></p>
+ <p><a href="image1.html#color_floodfill">color_floodfill</a>,
+ <a href="#opaque_channel">opaque_channel</a></p>
+
+ <h4>Magick API</h4>
+
+ <p>OpaquePaintImageChannel</p>
+ </div>
+
+ <div class="sig">
+ <h3 id="opaque_channel">opaque_channel</h3>
+
+ <p><span class="arg">img</span>.opaque_channel(<span class=
+ "arg">target</span>, <span class="arg">fill</span>,
+ <span class="arg">invert</span>=false, <span class=
+ "arg">fuzz</span>=<span class="arg">img</span>.fuzz [,
+ <span class="arg">channel</span>...]) -&gt; <em>image</em></p>
+ </div>
+
+ <div class="desc">
+ <h4>Description</h4>
+
+ <p>Changes all pixels having the target color to the fill
+ color. If <span class="arg">invert</span> is true, changes all
+ the pixels that are <em>not</em> the target color to the fill
+ color.</p>
+
+ <h4>Arguments</h4>
+
+ <dl>
+ <dt>target</dt>
+
+ <dd>The color to be replaced. May be a color name or a
+ <a href="struct.html#Pixel">Pixel</a></dd>
+
+ <dt>fill</dt>
+
+ <dd>The replacement color. May be a color name or a <a href=
+ "struct.html#Pixel">Pixel</a></dd>
+
+ <dt>invert</dt>
+
+ <dd>If true, the target pixels are all the pixels that are
+ not the target color. The default is the value of the target
+ image's <code>fuzz</code> attribute</dd>
+
+ <dt>fuzz</dt>
+
+ <dd>Colors within this distance are considered equal to the
+ target color.</dd>
+
+ <dt>channel...</dt>
+
+ <dd>0 or more <a href=
+ "constants.html#ChannelType">ChannelType</a> arguments. If no
+ channels are specified, the default is <a href=
+ "constants.html#ChannelType">DefaultChannels</a>.</dd>
+ </dl>
+
+ <h4>Returns</h4>
+
+ <p>A new image</p>
+
+ <h4>See also</h4>
+
+ <p><a href="#opaque">opaque</a></p>
<h4>Magick API</h4>
- <p>OpaqueImage</p>
+ <p>OpaquePaintImageChannel</p>
</div>
<div class="sig">
View
101 doc/image3.html
@@ -73,6 +73,9 @@ <h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
<ul>
<li><a href="#palette_q">palette?</a></li>
+ <li><a href=
+ "#paint_transparent">paint_transparent</a></li>
+
<li><a href="#pixel_color">pixel_color</a></li>
<li><a href="#polaroid">polaroid</a></li>
@@ -179,13 +182,13 @@ <h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
<li><a href="#store_pixels">store_pixels</a></li>
<li><a href="#strip_bang">strip!</a></li>
+
+ <li><a href="#swirl">swirl</a></li>
</ul>
</div>
<div class="toccol">
<ul>
- <li><a href="#swirl">swirl</a></li>
-
<li><a href="#sync_profiles">sync_profiles</a></li>
<li><a href=
@@ -269,6 +272,67 @@ <h3 id="palette_q">palette?</h3>
</div>
<div class="sig">
+ <h3 id="paint_transparent">paint_transparent</h3>
+
+ <p><span class="arg">img</span>.paint_transparent(<span class=
+ "arg">color</span>, <span class=
+ "arg">opacity</span>=TransparentOpacity, <span class=
+ "arg">invert</span>=false, <span class=
+ "arg">fuzz</span>=<span class="arg">img</span>.fuzz) -&gt;
+ <em>image</em></p>
+ </div>
+
+ <div class="desc">
+ <h4>Description</h4>
+
+ <p>Changes the opacity value of all the pixels that match
+ <span class="arg">color</span> to the value specified by
+ <span class="arg">opacity</span>. If <span class=
+ "arg">invert</span> is true, changes the pixels that don't
+ match <span class="arg">color</span>.</p>
+
+ <h4>Arguments</h4>
+
+ <dl>
+ <dt>color</dt>
+
+ <dd>Either a <a href="imusage.html#color_names">color
+ name</a> or a <a href="struct.html#Pixel">pixel</a>.</dd>
+
+ <dt>opacity</dt>
+
+ <dd>The new opacity value, either an <a href=
+ "constants.html#Opacity">opacity</a> value or a number
+ between 0 and QuantumRange. The default is
+ TransparentOpacity.</dd>
+
+ <dt>invert</dt>
+
+ <dd>If true, changes all the pixels that are <em>not</em> the
+ target color.</dd>
+
+ <dt>fuzz</dt>
+
+ <dd>By default the pixel must match exactly, but you can
+ specify a tolerence level by passing a positive value.</dd>
+ </dl>
+
+ <h4>Returns</h4>
+
+ <p>A new image</p>
+
+ <h4>See also</h4>
+
+ <p><a href="image2.html#matte_replace">matte_replace</a>,
+ <a href="draw.html#matte">Draw#matte</a>, <a href=
+ "#transparent">transparent</a></p>
+
+ <h4>Magick API</h4>
+
+ <p>TransparentPaintImage</p>
+ </div>
+
+ <div class="sig">
<h3 id="pixel_color">pixel_color</h3>
<p><span class="arg">img</span>.pixel_color(<span class=
@@ -1303,17 +1367,18 @@ <h3 id="resize_to_fill">resize_to_fill</h3>
<p class="rollover"><a href=
"javascript:popup('resize_to_fill.rb.html')">
- <!-- This img tag displays the original image when the mouse is over -->
- <img id="cropless" style="display: none" onmouseout=
- "this.style.display='none';cropped.style.display='';" src=
- "ex/images/Flower_Hat.jpg" alt="crop_resize example" title=
- "Click to see the example script" />
- <!-- This img tag displays the framed image when the mouse is not over-->
- <img style=
+ <!-- This img tag displays the after image when the mouse is not over-->
+ <img src="ex/resize_to_fill.jpg" style=
"padding-left:62px; padding-right: 62px; padding-top: 87px;padding-bottom:87px;"
- id="cropped" onmouseover=
- "this.style.display='none';cropless.style.display='';" src=
- "ex/resize_to_fill.jpg" alt="frame example" /></a> <img src=
+ id="after_resize_to_fill" onmouseover=
+ "this.style.display='none'; before_resize_to_fill.style.display='';"
+ alt="resize_to_fill example" />
+ <!-- This img tag displays the before image when moused over -->
+ <img src="ex/images/Flower_Hat.jpg" style="display: none" id=
+ "before_resize_to_fill" onmouseout=
+ "this.style.display='none'; after_resize_to_fill.style.display='';"
+ alt="resize_to_fill example" title=
+ "Click to see the example script" /></a> <img src=
"ex/images/spin.gif" alt="" style="margin-bottom: 230px" title=
"Mouse over the example to see the original image" /></p>
@@ -1401,15 +1466,16 @@ <h3 id="resize_to_fit">resize_to_fit</h3>
<!-- This img tag displays the original image when the mouse is over -->
<img id="rtfless" style="display: none" onmouseout=
"this.style.display='none';rtf.style.display='';" src=
- "ex/images/Flower_Hat.jpg" alt="resize_to_fill example" title=
+ "ex/images/Flower_Hat.jpg" alt="resize_to_fit example" title=
"Click to see the example script" />
<!-- This img tag displays the framed image when the mouse is not over-->
<img style=
"padding-left:69px; padding-right: 69px; padding-top: 87px;padding-bottom:87px;"
id="rtf" onmouseover=
"this.style.display='none';rtfless.style.display='';" src=
- "ex/resize_to_fit.jpg" alt="frame example" /></a> <img src=
- "ex/images/spin.gif" alt="" style="margin-bottom: 230px" title=
+ "ex/resize_to_fit.jpg" alt="resize_to_fit example" /></a>
+ <img src="ex/images/spin.gif" alt="" style=
+ "margin-bottom: 230px" title=
"Mouse over the example to see the original image" /></p>
<h4>See also</h4>
@@ -3205,11 +3271,12 @@ <h3 id="transparent">transparent</h3>
<h4>See also</h4>
<p><a href="image2.html#matte_replace">matte_replace</a>,
- <a href="draw.html#matte">Draw#matte</a></p>
+ <a href="draw.html#matte">Draw#matte</a>, <a href=
+ "#paint_transparent">paint_transparent</a></p>
<h4>Magick API</h4>
- <p>TransparentImage</p>
+ <p>TransparentPaintImage</p>
</div>
<div class="sig">
View
22 doc/optequiv.html
@@ -1192,11 +1192,15 @@ <h2 class="methods" id="convert">convert, mogrify</h2>
</tr>
<tr>
- <td>-opaque <em>color</em></td>
+ <td>-opaque <em>color</em><br />
+ +opaque <em>color</em></td>
<td>Image#<a href=
"image2.html#opaque">opaque</a>(<em>color</em>,
- <em>fill</em>)</td>
+ <em>fill</em>)<br />
+ Image#<a href=
+ "image2.html#opaque_channel">opaque_channel</a>(<em>color</em>,
+ fill, opacity, true)</td>
</tr>
<tr>
@@ -1795,10 +1799,18 @@ <h2 class="methods" id="convert">convert, mogrify</h2>
</tr>
<tr>
- <td>-transparent <em>color</em></td>
+ <td>-transparent <em>color</em><br />
+ +transparent <em>color</em></td>
+
+ <td>Image#<a href=
+ "image3.html#transparent">transparent</a>(<em>color</em>,
+ <em><a href=
+ "constants.html#Opacity">opacity</a></em>=TransparentOpacity)<br />
- <td>Image#transparent(<em>color</em>, <em><a href=
- "constants.html#Opacity">opacity</a></em>=TransparentOpacity)</td>
+ Image#<a href=
+ "image3.html#paint_transparent">paint_transparent</a>(<em>color</em>,
+ <em><a href="constants.html#Opacity">opacity</a></em>,
+ true)</td>
</tr>
<tr>
View
7 doc/usage.html
@@ -756,7 +756,8 @@ <h2 id="modifying">Examining and modifying images</h2>
<dd>Make the entire image transparent</dd>
- <dt><a href="image2.html#opaque">opaque</a></dt>
+ <dt><a href="image2.html#opaque">opaque</a>, <a href=
+ "image2.html#opaque_channel">opaque_channel</a></dt>
<dd>Change all pixels from the specified color to a new
color</dd>
@@ -781,7 +782,9 @@ <h2 id="modifying">Examining and modifying images</h2>
<dd>Replace neighboring pixels that are the same color with
pixels from a texture image</dd>
- <dt><a href="image3.html#transparent">transparent</a></dt>
+ <dt><a href=
+ "image3.html#paint_transparent">paint_transparent</a>,
+ <a href="image3.html#transparent">transparent</a></dt>
<dd>Change the opacity value of pixels having the specified
color</dd>

0 comments on commit 130bcd2

Please sign in to comment.