doc/struct.html in rmagick-2.2.2 vs doc/struct.html in rmagick-2.3.0
- old
+ new
@@ -4,11 +4,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
- <title>RMagick 2.2.2: Miscellaneous classes</title>
+ <title>RMagick 2.3.0: Miscellaneous classes</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<meta name="GENERATOR" content="Quanta Plus" />
<meta name="Copyright" content=
"Copyright (C) 2006 by Timothy P. Hunter" />
@@ -25,11 +25,11 @@
/*]]>*/
</style>
</head>
<body>
- <h6 id="header">RMagick 2.2.2 User's Guide and Reference</h6>
+ <h6 id="header">RMagick 2.3.0 User's Guide and Reference</h6>
<div class="nav">
« <a href="draw.html">Prev</a> | <a href=
"index.html">Contents</a> | <a href=
"info.html">Next</a> »
@@ -130,11 +130,11 @@
<h5>Description</h5>
<p>The easiest way to use an <code>Image::View</code> object
is to create it with the <a href=
"image3.html#view">Image#view</a> method, which provides a
- block-scoped view and automatic sync'ing. You probably won't
+ block-scoped view and automatic syncing. You probably won't
want to create a view by calling <code>new</code>.</p>
<h5>Arguments</h5>
<dl>
@@ -222,11 +222,11 @@
pixels = view[[3]][[1]]
# Get all the pixels in the 4th row
pixels = view[3][]
# Use arrays to specify a non-contiguous set of rows and columns
pixels = view[[1,3,5]][[2,4,6]]
- # Use ranges to specify a contigous set of rows and columns
+ # Use ranges to specify a contiguous set of rows and columns
pixels = view[1..5][2..6]
</pre>
</div>
<div class="sig">
@@ -412,12 +412,12 @@
<div class="intro">
<h3>Introduction</h3>
<p>The Geometry class contains the same information as an
ImageMagick <a href="imusage.html#geometry">geometry
- string</a>. Geometry objects are interchangable with geometry
- strings.</p>
+ string</a>. Geometry objects are interchangeable with
+ geometry strings.</p>
</div>
<h3>class Geometry <span class="superclass"><
Object</span></h3>
@@ -576,11 +576,11 @@
<div class="intro">
<h3>Introduction</h3>
<p>A pixel describes the smallest individually addressable
- part of an image. In the RBG <a href=
+ part of an image. In the RGB <a href=
"constants.html#ColorspaceType">colorspace</a>, a pixel's
color is described by its intensity in the red, green, and
blue channels. Its opacity is described by its intensity in
the opacity (also called alpha, or matte) channel. In the
CMYK colorspace a pixel's color is described by its intensity
@@ -655,21 +655,48 @@
"imusage.html#color_names">color name</a>. Raises
ArgumentError if the name is unknown.</p>
</div>
<div class="sig">
- <h4>from_HSL</h4>
+ <h4 id="from_hsla">from_hsla</h4>
- <p>Pixel.from_HSL(<span class="arg">[hue, saturation,
- luminosity]</span>) -> <em>pixel</em></p>
+ <p>Pixel.from_hsla(<span class="arg">hue</span>, <span class=
+ "arg">saturation</span>, <span class="arg">lightness</span>,
+ <span class="arg">alpha</span>=1.0) -> <em>pixel</em></p>
</div>
<div class="desc">
<h5>Description</h5>
- <p>Constructs a pixel object from the specified array of 3
- values: hue, saturation, and luminosity.</p>
+ <p>Constructs a pixel object from the specified
+ arguments.</p>
+
+ <h5>Arguments</h5>
+
+ <dl>
+ <dt>hue</dt>
+
+ <dd>A value in the range [0.0, 360.0).</dd>
+
+ <dt>saturation</dt>
+
+ <dd>A value in the range [0.0, 100.0].</dd>
+
+ <dt>lightness</dt>
+
+ <dd>A value in the range 0.0, 100.0].</dd>
+
+ <dt>alpha</dt>
+
+ <dd>A value in the range [0.0, 1.0], where 1.0 is fully
+ opaque and 0.0 is fully transparent. This argument may be
+ omitted. The default is 1.0.</dd>
+ </dl>
+
+ <h5>See also</h5>
+
+ <p><a href="#to_hsla">to_hsla</a></p>
</div>
<div class="sig">
<h4 id="spaceship"><=></h4>
@@ -767,22 +794,22 @@
<h4>to_color</h4>
<p><span class="arg">pixel</span>.to_color(<span class=
"arg">compliance</span>=AllCompliance, <span class=
"arg">matte</span>=<code>false</code>, <span class=
- "arg">depth</span>=<code>QuantumDepth</code>) ->
+ "arg">depth</span>=<code>QuantumDepth</code>, <span class=
+ "arg">hex</span>=<code>false</code>) ->
<em>string</em></p>
</div>
<div class="desc">
<h5>Description</h5>
<p>Returns the <a href="imusage.html#color_names">color
name</a> corresponding the the pixel values. If there is no
such named color in the specified color standard, returns a
- string in the form "#RRGGBBOO" or, if the depth is 16,
- "#RRRRGGGGBBBBOOOO".</p>
+ string in the form "rgb(r,g,b,a)".</p>
<h5>Arguments</h5>
<dl>
<dt>compliance</dt>
@@ -802,10 +829,16 @@
<dd>An image depth. The default is the quantum depth used
when ImageMagick was compiled. The values 16 and 32 can be
used only when ImageMagick was compiled with the
appropriate QuantumDepth.</dd>
+
+ <dt>hex</dt>
+
+ <dd>If true, represent the color name in hex (#rrggbbaa or
+ #rrrrggggbbbbaaaa) format. In this case <span class=
+ "arg">compliance</span> is meaningless.</dd>
</dl>
<h5>See also</h5>
<p>Compare this method to <a href=
@@ -813,25 +846,27 @@
<span class="arg">matte</span> and <span class=
"arg">depth</span> values are taken from an image.</p>
</div>
<div class="sig">
- <h4>to_HSL</h4>
+ <h4>to_hsla</h4>
<p><span class="arg">pixel</span>.to_HSL ->
<em>array</em></p>
</div>
<div class="desc">
<h5>Description</h5>
<p>Converts the RGB representation of the pixel to hue,
- saturation, and luminosity values.</p>
+ saturation, lightness, and alpha values.</p>
<h5>Returns</h5>
- <p>An array of the form <code>[hue, saturation,
- luminosity]</code>.</p>
+ <p>An array of the form <code>[hue, saturation, lightness,
+ alpha]</code>. Each value is in the range specified for it,
+ as described in <a href="#from_hsla">from_hsla</a>,
+ above.</p>
</div>
</div>
<div class="subhd">
<h2 id="struct">Struct classes</h2>