Permalink
Browse files

Change montage tile= option to specify the exact number of rows neede…

…d. Conform to new IM 6.1.0 expectations.
  • Loading branch information...
1 parent e3d70c3 commit cdc6e03d681706c747980b537f92a00a22dcd615 rmagick committed Oct 6, 2004
Showing with 32 additions and 23 deletions.
  1. +2 −1 doc/ex/composite.rb
  2. +2 −1 doc/ex/demo.rb
  3. +28 −21 doc/ilist.html
View
3 doc/ex/composite.rb
@@ -123,7 +123,8 @@
montage = list.montage {
self.geometry = Geometry.new(COLS, ROWS, 3, 3)
- self.tile = Geometry.new(4, 1000)
+ rows = (list.size+3) / 4
+ self.tile = Geometry.new(4, rows)
self.texture = granite[0]
self.fill = 'white'
self.stroke = 'transparent'
View
3 doc/ex/demo.rb
@@ -276,7 +276,8 @@
self.geometry = "130x194+10+5>"
self.gravity = CenterGravity
self.border_width = 1
- self.tile = "5x1000"
+ rows = (example.size + 4) / 5
+ self.tile = Geometry.new(5,rows)
self.compose = OverCompositeOp
# Use the ImageMagick built-in "granite" format
View
49 doc/ilist.html
@@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
- "HTML Tidy for Linux/x86 (vers 1st July 2003), see www.w3.org" />
+ "HTML Tidy for Linux/x86 (vers 1st September 2004), see www.w3.org" />
<title>RMagick: class ImageList</title>
<meta http-equiv="Content-Type" content=
@@ -13,9 +13,9 @@
<meta name="Copyright" content=
"Copyright (C) 2004 by Timothy P. Hunter" />
<link rel="stylesheet" type="text/css" href="css/doc.css" />
- <script type="text/javascript" src="scripts/doc.js">
- </script>
- <script type="text/javascript">
+<script type="text/javascript" src="scripts/doc.js">
+</script>
+<script type="text/javascript">
//<![CDATA[
<!-- Pre-load these images -->
img = new Image();
@@ -25,13 +25,13 @@
img.src = "ex/morph.gif";
img.src = "ex/quantize-m_before.jpg";
//]]>
- </script>
- <style type="text/css">
+</script>
+<style type="text/css">
/*<![CDATA[*/
/* Styles local to this page. */
/*]]>*/
- </style>
+</style>
</head>
<body>
@@ -513,16 +513,18 @@ <h3 id="average">average</h3>
<!-- This img tag displays the original image when the mouse is over -->
<img style="display:none" id="notaveraged" onmouseout=
"this.style.display='none'; averaged.style.display=''; averagedspin.style.display='';"
- title="Click to see the example script" src=
- "ex/average_before.gif" alt="average example" /><!--
+ title="Click to see the example script" src=
+ "ex/average_before.gif" alt="average example" name=
+ "notaveraged" /><!--
This img tag displays the averaged image when the mouse is not over
--><img style="display:" id=
- "averaged" onmouseover=
- "this.style.display='none'; notaveraged.style.display=''; averagedspin.style.display='none';"
- src="ex/average_after.gif" alt="average example" /></a>
- <img src="ex/images/spin.gif" alt="" class="spin" style=
- "left:131px; display:" id="averagedspin" title=
- "Mouse over the example to see the 3 original images" /></p>
+"averaged" onmouseover=
+"this.style.display='none'; notaveraged.style.display=''; averagedspin.style.display='none';"
+ src="ex/average_after.gif" alt="average example" name=
+ "averaged" /></a> <img src="ex/images/spin.gif" alt="" class=
+ "spin" style="left:131px; display:" id="averagedspin" title=
+ "Mouse over the example to see the 3 original images" name=
+ "averagedspin" /></p>
<h4>Magick API</h4>
@@ -1069,7 +1071,9 @@ <h3 id="montage">montage</h3>
"granite" texture as the background, use:
<pre>
self.texture = Magick::Image.read("granite:").first
-</pre>The default is no texture.
+</pre>
+
+ <p>The default is no texture.</p>
</dd>
<dt>tile=</dt>
@@ -1082,16 +1086,19 @@ <h3 id="montage">montage</h3>
<code>"&lt;columns&gt;x&lt;rows&gt;"</code>. If the value
is a Geometry object, specify the number of columns as the
<code>width</code> attribute and the number of rows as the
- <code>height</code> attribute. To arrange the tiles 4
- across and 10 down, use:
+ <code>height</code> attribute. <code>montage</code> always
+ generates all the rows, leaving empty cells if necessary.
+ To arrange the tiles 4 across and 10 down, use:
<pre>
self.tile = "4x10"
</pre>or
<pre>
self.tile = Magick::Geometry.new(4,10)
-</pre>The default is "6x4". If there are too many tiles to fit on
-one composite image, <code>montage</code> creates multiple
-composite images.
+</pre>
+
+ <p>The default is "6x4". If there are too many tiles to fit
+ on one composite image, <code>montage</code> creates
+ multiple composite images.</p>
</dd>
</dl>

0 comments on commit cdc6e03

Please sign in to comment.