rmagick 1.8.0 → 1.8.1
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.
- data/ChangeLog +6 -0
- data/README-Mac-OSX.txt +194 -0
- data/README.html +8 -8
- data/README.txt +6 -6
- data/configure +14 -12
- data/configure.ac +3 -2
- data/doc/css/doc.css +1 -1
- data/doc/ex/writing_mode01.rb +2 -2
- data/doc/ilist.html +5 -3
- data/doc/imusage.html +3 -3
- data/doc/rvg.html +91 -8
- data/doc/rvgimage.html +4 -2
- data/doc/rvgshape.html +43 -6
- data/doc/rvgstyle.html +4 -1
- data/doc/rvgtspan.html +4 -4
- data/doc/usage.html +22 -5
- data/ext/RMagick/MANIFEST +2 -1
- data/ext/RMagick/extconf.rb.in +1 -1
- data/ext/RMagick/rmagick.h +5 -1
- data/ext/RMagick/rmagick_config.h.in +2 -0
- data/ext/RMagick/rmfill.c +13 -13
- data/ext/RMagick/rmimage.c +3 -3
- data/lib/rvg/embellishable.rb +32 -12
- data/lib/rvg/misc.rb +2 -2
- data/rmagick.gemspec +1 -1
- metadata +3 -2
data/ChangeLog
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
RMagick 1.8.1
|
2
|
+
o Fix bugs #1876, #1888, #1919
|
3
|
+
o Added feature #1941, RVG's polyline, polygon accept array arguments
|
4
|
+
o Numerous fixes to the RVG documentation
|
5
|
+
|
6
|
+
|
1
7
|
RMagick 1.8.0
|
2
8
|
o Added Image#shadow (ImageMagick 6.1.7)
|
3
9
|
o Added Image::Info#undefine, #[], #[]=
|
data/README-Mac-OSX.txt
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
HOWTO Install RMagick on Mac OS X
|
2
|
+
|
3
|
+
This HOWTO describes a method for installing RMagick, ImageMagick or
|
4
|
+
GraphicsMagick, and the delegate libraries used by ImageMagick and
|
5
|
+
GraphicsMagick. You only need to install one of ImageMagick or GraphicsMagick.
|
6
|
+
The procedure is the same for either library. Throughout the remainder of this
|
7
|
+
document I will use the word "xMagick" to refer to either of these two
|
8
|
+
libraries. I developed this procedure using a Powerbook G4 and Mac OS X 10.3.8.
|
9
|
+
If you are using a different version of Mac OS X some of the details may be
|
10
|
+
different. In particular these instructions assume you are using bash as your
|
11
|
+
shell.
|
12
|
+
|
13
|
+
You will need to have your Mac OS X installation disks, a connection to
|
14
|
+
the Internet, and at least an hour of free time (assuming you have a
|
15
|
+
broadband connection).
|
16
|
+
|
17
|
+
Step 1. Install X11, the Xcode Tools, and the X11SDK.
|
18
|
+
|
19
|
+
xMagick needs a X server to display images, so you'll need to install X11. Some
|
20
|
+
versions of Mac OS X come with X11 on the installation disk. Mine did not. If
|
21
|
+
your install disks do not include this package, you can download it from
|
22
|
+
http://www.apple.com/macosx/features/x11/download/.
|
23
|
+
|
24
|
+
After installing X11, install the Xcode Tools and the X11SDK. These packages
|
25
|
+
can be found on your OS X installation disk. The X11SDK is not installed by
|
26
|
+
default. When you get to the Installer step labeled "Installation Type" click
|
27
|
+
the "Custom" button. You will be presented with a list of packages to install.
|
28
|
+
Check "X11SDK".
|
29
|
+
|
30
|
+
Step 2. Install DarwinPorts
|
31
|
+
|
32
|
+
Go to http://darwinports.opendarwin.org/getdp/ and follow the instructions to
|
33
|
+
download and install DarwinPorts. (The remainder of this document assumes that
|
34
|
+
you take all the defaults during the installation.)
|
35
|
+
|
36
|
+
Step 3: Install the delegate libraries
|
37
|
+
|
38
|
+
xMagick uses a large number of delegate libraries. (See the README.txt file in
|
39
|
+
the xMagick distribution for a complete list.) Here we'll use DarwinPorts to
|
40
|
+
install delegates for popular image formats and that are needed to run the
|
41
|
+
RMagick example programs. Enter the following port commands:
|
42
|
+
|
43
|
+
sudo port install jpeg
|
44
|
+
sudo port install libpng
|
45
|
+
sudo port install libwmf
|
46
|
+
sudo port install tiff
|
47
|
+
sudo port install lcms
|
48
|
+
sudo port install freetype
|
49
|
+
sudo port install ghostscript
|
50
|
+
|
51
|
+
Note that some of these libraries have prerequisites which will be automatically
|
52
|
+
installed.
|
53
|
+
|
54
|
+
Step 4: Install ImageMagick or GraphicsMagick
|
55
|
+
|
56
|
+
Go to http://www.imagemagick.org or http://www.graphicsmagick.org and download
|
57
|
+
the latest version of the software to a temporary directory. Unroll the tarball
|
58
|
+
and make the new directory current.
|
59
|
+
|
60
|
+
Before proceeding, you need to make sure you're using the correct version of the
|
61
|
+
freetype library. The X11 files you installed in Step 1 include a version of
|
62
|
+
the freetype library, and of course you just installed another version using
|
63
|
+
DarwinPorts. You need to use the DarwinPorts version when you're building
|
64
|
+
xMagick. To make sure you have the right version, enter the command:
|
65
|
+
|
66
|
+
freetype-config --cflags
|
67
|
+
|
68
|
+
You should see this output:
|
69
|
+
|
70
|
+
-I/opt/local/include/freetype2 -I/opt/local/include
|
71
|
+
|
72
|
+
If you see the following output instead,
|
73
|
+
|
74
|
+
-I/usr/X11R6/include -I/usr/X11R6/include/freetype2
|
75
|
+
|
76
|
+
you should edit your $PATH to make sure that /opt/local/bin preceeds
|
77
|
+
/usr/X11R6/bin. Do not try to install xMagick until you get the correct output
|
78
|
+
from the freetype-config program.
|
79
|
+
|
80
|
+
To configure xMagick, enter these commands:
|
81
|
+
|
82
|
+
export CPPFLAGS=-I/opt/local/include
|
83
|
+
export LDFLAGS=-L/opt/local/lib
|
84
|
+
./configure --prefix=/opt/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --with-gs-font-dir=/opt/local/share/ghostscript/fonts
|
85
|
+
|
86
|
+
The ./configure command should be entered on a single line. The
|
87
|
+
--prefix=/opt/local option will cause xMagick to be installed in the same
|
88
|
+
directory as the libraries we installed with DarwinPorts. If you want to
|
89
|
+
install xMagick somewhere else, specify a different directory. If you do not
|
90
|
+
specify the --prefix option xMagick will be installed in /usr/local. The
|
91
|
+
--disable-static and --with-modules options cause xMagick to be built with
|
92
|
+
dynamically loaded modules. Since you're installing xMagick for use with Ruby,
|
93
|
+
I've included the --without-perl and --without-magick-plus-plus options to
|
94
|
+
suppress the Perl and C++ support. The --with-quantum-depth=8 option configures
|
95
|
+
xMagick to use a bit depth of 8. If you need to build with a different bit
|
96
|
+
depth (and if you need to you'll already know it) you can specify 16 or 32.
|
97
|
+
Finally, the --with-gs-font-dir option tells xMagick where the Ghostscript fonts
|
98
|
+
are installed.
|
99
|
+
|
100
|
+
For more information about all these options see xMagick's README.txt file.
|
101
|
+
|
102
|
+
./configure will produce quite a bit of output. The last page is the most
|
103
|
+
interesting. If you've successfully performed all the steps so far and used all
|
104
|
+
the deafults, the output from configure should end with a page like this:
|
105
|
+
|
106
|
+
-------------------------------------------------------------------------------
|
107
|
+
|
108
|
+
ImageMagick is configured as follows. Please verify that this configuration matches your expectations.
|
109
|
+
|
110
|
+
Host system type : powerpc-apple-darwin7.8.0
|
111
|
+
|
112
|
+
Option Value
|
113
|
+
-------------------------------------------------------------------------
|
114
|
+
Shared libraries --enable-shared=yes yes
|
115
|
+
Static libraries --enable-static=no no
|
116
|
+
Module support --with-modules=yes yes
|
117
|
+
GNU ld --with-gnu-ld=no no
|
118
|
+
Quantum depth --with-quantum-depth=8 8
|
119
|
+
|
120
|
+
Delegate Configuration:
|
121
|
+
BZLIB --with-bzlib=yes yes
|
122
|
+
DPS --with-dps=yes yes
|
123
|
+
FlashPIX --with-fpx=no no
|
124
|
+
FreeType 2.0 --with-ttf=yes yes
|
125
|
+
Ghostscript None gs (8.14)
|
126
|
+
Ghostscript fonts --with-gs-font-dir=/opt/local/share/ghostscript/fonts /opt/local/share/ghostscript/fonts/
|
127
|
+
Ghostscript lib --with-gslib=no no
|
128
|
+
Graphviz --with-dot=yes no
|
129
|
+
JBIG --with-jbig=yes no
|
130
|
+
JPEG v1 --with-jpeg=yes yes
|
131
|
+
JPEG-2000 --with-jp2=yes no
|
132
|
+
LCMS --with-lcms=yes yes
|
133
|
+
Magick++ --with-magick-plus-plus=no no
|
134
|
+
PERL --with-perl=no no
|
135
|
+
PNG --with-png=yes yes
|
136
|
+
TIFF --with-tiff=yes yes
|
137
|
+
Windows fonts --with-windows-font-dir=none
|
138
|
+
WMF --with-wmf=yes yes
|
139
|
+
X11 --with-x= yes
|
140
|
+
XML --with-xml=yes yes
|
141
|
+
ZLIB --with-zlib=yes yes
|
142
|
+
|
143
|
+
X11 Configuration:
|
144
|
+
X_CFLAGS = -I/usr/X11R6/include
|
145
|
+
|
146
|
+
X_PRE_LIBS = -lSM -lICE
|
147
|
+
X_LIBS = -L/usr/X11R6/lib
|
148
|
+
X_EXTRA_LIBS =
|
149
|
+
|
150
|
+
Options used to compile and link:
|
151
|
+
PREFIX = /opt/local
|
152
|
+
EXEC-PREFIX = /opt/local
|
153
|
+
VERSION = X.Y.Z
|
154
|
+
CC = gcc
|
155
|
+
CFLAGS = -g -O2 -Wall
|
156
|
+
CPPFLAGS = -I/opt/local/include
|
157
|
+
PCFLAGS =
|
158
|
+
DEFS = -DHAVE_CONFIG_H
|
159
|
+
LDFLAGS = -L/opt/local/lib -L/opt/local/lib -L/usr/X11R6/lib -L/opt/local/lib -lfreetype -lz -L/usr/lib
|
160
|
+
LIBS = -lMagick -llcms -ltiff -lfreetype -ljpeg -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lpthread -lm -lpthread
|
161
|
+
CXX = g++
|
162
|
+
CXXFLAGS =
|
163
|
+
|
164
|
+
-------------------------------------------------------------------------------
|
165
|
+
|
166
|
+
Of course, instead of VERSION X.Y.Z you will see the version number of the
|
167
|
+
version of xMagick that you downloaded. Check your output to make sure that
|
168
|
+
xMagick located all the delegate libraries. You should see "yes" in the Value
|
169
|
+
column for bzlib, FreeType 2.0, JPEG v1, LCMS, PNG, TIFF, WMF, X11, XML, and
|
170
|
+
ZLIB.
|
171
|
+
|
172
|
+
If you get this output from ./configure you're ready to proceed. If you are
|
173
|
+
missing some delegates you should resolve those issues before continuing.
|
174
|
+
Re-run ./configure, being very careful to enter the commands correctly.
|
175
|
+
|
176
|
+
Once you're satisfied that you've configured xMagick the way you want it, enter
|
177
|
+
these two commands:
|
178
|
+
|
179
|
+
make
|
180
|
+
sudo make install
|
181
|
+
|
182
|
+
Step 5: Installing RMagick
|
183
|
+
|
184
|
+
The hard part is done. All we have to do now is install RMagick. If you
|
185
|
+
haven't already done so, download the RMagick tarball from Rubyforge and unroll
|
186
|
+
it into a temporary directory. Make that directory current. Enter these
|
187
|
+
commands
|
188
|
+
|
189
|
+
./configure
|
190
|
+
make
|
191
|
+
sudo make install
|
192
|
+
|
193
|
+
The make step will take a few minutes to run since it builds all of the RMagick
|
194
|
+
examples. That's it. You should have a complete install of xMagick and RMagick.
|
data/README.html
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>RMagick 1.8.
|
4
|
+
<title>RMagick 1.8.1 README</title>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
6
6
|
<meta name="GENERATOR" content="BlueCloth">
|
7
7
|
</head>
|
8
8
|
<body>
|
9
|
-
<h1>RMagick 1.8.
|
9
|
+
<h1>RMagick 1.8.1 README</h1>
|
10
10
|
|
11
|
-
<h2>
|
11
|
+
<h2>05/22/05</h2>
|
12
12
|
|
13
13
|
<h2>Table Of Contents</h2>
|
14
14
|
|
@@ -42,7 +42,7 @@ ImageMagick and GraphicsMagick image processing libraries.</p>
|
|
42
42
|
|
43
43
|
<p><strong>Author:</strong> Tim Hunter</p>
|
44
44
|
|
45
|
-
<p><strong>Email:</strong> <a href="&#
|
45
|
+
<p><strong>Email:</strong> <a href="mailto:rmagick@rubyforge.org">rmagick@rubyforge.org</a></p>
|
46
46
|
|
47
47
|
<p><strong>RubyForge:</strong> <a href="http://rubyforge.org/projects/rmagick/">http://rubyforge.org/projects/rmagick/</a></p>
|
48
48
|
|
@@ -218,7 +218,7 @@ addition to the regular options, there are a few RMagick-specific options:</p>
|
|
218
218
|
|
219
219
|
<h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
|
220
220
|
|
221
|
-
<p>De-compress the RMagick-1.8.
|
221
|
+
<p>De-compress the RMagick-1.8.1.tar.gz archive and enter the top
|
222
222
|
directory. Then type:</p>
|
223
223
|
|
224
224
|
<pre><code>$ ./configure <configuration options>
|
@@ -235,9 +235,9 @@ $ make clean
|
|
235
235
|
|
236
236
|
<p>When make is running the examples, if you get a message like this:</p>
|
237
237
|
|
238
|
-
<pre><code>/home/you/RMagick-1.8.
|
238
|
+
<pre><code>/home/you/RMagick-1.8.1/lib/RMagick.rb:11:in `require': libMagick.so.0:
|
239
239
|
cannot open shared object file: No such file or directory -
|
240
|
-
/home/you/RMagick-1.8.
|
240
|
+
/home/you/RMagick-1.8.1/ext/RMagick/RMagick.so (LoadError)
|
241
241
|
</code></pre>
|
242
242
|
|
243
243
|
<p>you probably do not have the directory in which the ImageMagick or GraphicsMagick
|
@@ -257,7 +257,7 @@ systems, see the documentation for the dynamic loading facility.</p>
|
|
257
257
|
|
258
258
|
<p>When make is running the examples, if you get a message like this:</p>
|
259
259
|
|
260
|
-
<pre><code>hook /home/me/src/RMagick-1.8.
|
260
|
+
<pre><code>hook /home/me/src/RMagick-1.8.1/./post-setup.rb failed:
|
261
261
|
No such file or directory - "/tmp/rmagick6872.6"
|
262
262
|
</code></pre>
|
263
263
|
|
data/README.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
RMagick 1.8.
|
1
|
+
RMagick 1.8.1 README
|
2
2
|
================================
|
3
|
-
|
3
|
+
05/22/05
|
4
4
|
--------
|
5
5
|
|
6
6
|
Table Of Contents
|
@@ -188,7 +188,7 @@ addition to the regular options, there are a few RMagick-specific options:
|
|
188
188
|
|
189
189
|
<h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
|
190
190
|
|
191
|
-
De-compress the RMagick-1.8.
|
191
|
+
De-compress the RMagick-1.8.1.tar.gz archive and enter the top
|
192
192
|
directory. Then type:
|
193
193
|
|
194
194
|
$ ./configure <configuration options>
|
@@ -203,9 +203,9 @@ directory. Then type:
|
|
203
203
|
#### Cannot open shared object file
|
204
204
|
When make is running the examples, if you get a message like this:
|
205
205
|
|
206
|
-
/home/you/RMagick-1.8.
|
206
|
+
/home/you/RMagick-1.8.1/lib/RMagick.rb:11:in `require': libMagick.so.0:
|
207
207
|
cannot open shared object file: No such file or directory -
|
208
|
-
/home/you/RMagick-1.8.
|
208
|
+
/home/you/RMagick-1.8.1/ext/RMagick/RMagick.so (LoadError)
|
209
209
|
|
210
210
|
you probably do not have the directory in which the ImageMagick or GraphicsMagick
|
211
211
|
library is installed in your load path. An easy way to fix this is to define the
|
@@ -222,7 +222,7 @@ systems, see the documentation for the dynamic loading facility.
|
|
222
222
|
#### No such file or directory - "/tmp/rmagick6872.6"
|
223
223
|
When make is running the examples, if you get a message like this:
|
224
224
|
|
225
|
-
hook /home/me/src/RMagick-1.8.
|
225
|
+
hook /home/me/src/RMagick-1.8.1/./post-setup.rb failed:
|
226
226
|
No such file or directory - "/tmp/rmagick6872.6"
|
227
227
|
|
228
228
|
you probably do not have a temporary directory environment variable set. Set
|
data/configure
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /bin/sh
|
2
2
|
# Guess values for system-dependent variables and create Makefiles.
|
3
|
-
# Generated by GNU Autoconf 2.59 for RMagick 1.8.
|
3
|
+
# Generated by GNU Autoconf 2.59 for RMagick 1.8.1.
|
4
4
|
#
|
5
5
|
# Report bugs to <rmagick@rubyforge.org>.
|
6
6
|
#
|
@@ -268,9 +268,9 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
|
268
268
|
|
269
269
|
# Identity of this package.
|
270
270
|
PACKAGE_NAME='RMagick'
|
271
|
-
PACKAGE_TARNAME='RMagick-1.8.
|
272
|
-
PACKAGE_VERSION='1.8.
|
273
|
-
PACKAGE_STRING='RMagick 1.8.
|
271
|
+
PACKAGE_TARNAME='RMagick-1.8.1.tar.gz'
|
272
|
+
PACKAGE_VERSION='1.8.1'
|
273
|
+
PACKAGE_STRING='RMagick 1.8.1'
|
274
274
|
PACKAGE_BUGREPORT='rmagick@rubyforge.org'
|
275
275
|
|
276
276
|
# Factoring default headers for most tests.
|
@@ -779,7 +779,7 @@ if test "$ac_init_help" = "long"; then
|
|
779
779
|
# Omit some internal or obsolete options to make the list less imposing.
|
780
780
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
781
781
|
cat <<_ACEOF
|
782
|
-
\`configure' configures RMagick 1.8.
|
782
|
+
\`configure' configures RMagick 1.8.1 to adapt to many kinds of systems.
|
783
783
|
|
784
784
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
785
785
|
|
@@ -836,7 +836,7 @@ fi
|
|
836
836
|
|
837
837
|
if test -n "$ac_init_help"; then
|
838
838
|
case $ac_init_help in
|
839
|
-
short | recursive ) echo "Configuration of RMagick 1.8.
|
839
|
+
short | recursive ) echo "Configuration of RMagick 1.8.1:";;
|
840
840
|
esac
|
841
841
|
cat <<\_ACEOF
|
842
842
|
|
@@ -981,7 +981,7 @@ fi
|
|
981
981
|
test -n "$ac_init_help" && exit 0
|
982
982
|
if $ac_init_version; then
|
983
983
|
cat <<\_ACEOF
|
984
|
-
RMagick configure 1.8.
|
984
|
+
RMagick configure 1.8.1
|
985
985
|
generated by GNU Autoconf 2.59
|
986
986
|
|
987
987
|
Copyright (C) 2003 Free Software Foundation, Inc.
|
@@ -995,7 +995,7 @@ cat >&5 <<_ACEOF
|
|
995
995
|
This file contains any messages produced by compilers while
|
996
996
|
running configure, to aid debugging if configure makes a mistake.
|
997
997
|
|
998
|
-
It was created by RMagick $as_me 1.8.
|
998
|
+
It was created by RMagick $as_me 1.8.1, which was
|
999
999
|
generated by GNU Autoconf 2.59. Invocation command line was
|
1000
1000
|
|
1001
1001
|
$ $0 $@
|
@@ -2531,8 +2531,10 @@ _ACEOF
|
|
2531
2531
|
LIBS="-l$MAGICKLIB $LIBS"
|
2532
2532
|
|
2533
2533
|
else
|
2534
|
-
{ { echo "$as_me:$LINENO: error: Can't install RMagick. Can't find lib${MAGICKLIB}
|
2535
|
-
|
2534
|
+
{ { echo "$as_me:$LINENO: error: Can't install RMagick. Can't find lib${MAGICKLIB} or one of the dependent libraries.
|
2535
|
+
Check the config.log file for more detailed information." >&5
|
2536
|
+
echo "$as_me: error: Can't install RMagick. Can't find lib${MAGICKLIB} or one of the dependent libraries.
|
2537
|
+
Check the config.log file for more detailed information." >&2;}
|
2536
2538
|
{ (exit 1); exit 1; }; }
|
2537
2539
|
fi
|
2538
2540
|
|
@@ -8386,7 +8388,7 @@ _ASBOX
|
|
8386
8388
|
} >&5
|
8387
8389
|
cat >&5 <<_CSEOF
|
8388
8390
|
|
8389
|
-
This file was extended by RMagick $as_me 1.8.
|
8391
|
+
This file was extended by RMagick $as_me 1.8.1, which was
|
8390
8392
|
generated by GNU Autoconf 2.59. Invocation command line was
|
8391
8393
|
|
8392
8394
|
CONFIG_FILES = $CONFIG_FILES
|
@@ -8446,7 +8448,7 @@ _ACEOF
|
|
8446
8448
|
|
8447
8449
|
cat >>$CONFIG_STATUS <<_ACEOF
|
8448
8450
|
ac_cs_version="\\
|
8449
|
-
RMagick config.status 1.8.
|
8451
|
+
RMagick config.status 1.8.1
|
8450
8452
|
configured by $0, generated by GNU Autoconf 2.59,
|
8451
8453
|
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
8452
8454
|
|
data/configure.ac
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
# RMagick configure.ac
|
3
3
|
|
4
|
-
AC_INIT(RMagick, 1.8.
|
4
|
+
AC_INIT(RMagick, 1.8.1, rmagick@rubyforge.org, RMagick-1.8.1.tar.gz)
|
5
5
|
echo "Configuring ${PACKAGE_STRING}"
|
6
6
|
|
7
7
|
AC_CONFIG_HEADER([ext/RMagick/rmagick_config.h])
|
@@ -62,7 +62,8 @@ AC_SUBST(CPPFLAGS, ${CPPFLAGS})
|
|
62
62
|
AC_SUBST(LOCAL_LIBS, `${MAGICKCONFIG} --libs`)
|
63
63
|
|
64
64
|
AC_CHECK_LIB($MAGICKLIB, InitializeMagick, [],
|
65
|
-
[AC_MSG_ERROR([Can't install RMagick. Can't find lib${MAGICKLIB}
|
65
|
+
[AC_MSG_ERROR([Can't install RMagick. Can't find lib${MAGICKLIB} or one of the dependent libraries.
|
66
|
+
Check the config.log file for more detailed information.])],
|
66
67
|
[`${MAGICKCONFIG} --libs`])
|
67
68
|
|
68
69
|
|
data/doc/css/doc.css
CHANGED
data/doc/ex/writing_mode01.rb
CHANGED
@@ -15,13 +15,13 @@ TEXT_STYLES2 = {:writing_mode=>'tb',
|
|
15
15
|
:font_weight=>'bold',
|
16
16
|
:font_size=>16}
|
17
17
|
|
18
|
-
rvg = RVG.new(1.25.in,
|
18
|
+
rvg = RVG.new(1.25.in, 7.in).viewbox(0,0,125,700) do |canvas|
|
19
19
|
canvas.background_fill = 'white'
|
20
20
|
|
21
21
|
canvas.text(40, 15, ":glyph_orientation_vertical=0").styles(TEXT_STYLES)
|
22
22
|
canvas.text(80, 25, ":glyph_orientation_vertical=90").styles(TEXT_STYLES2)
|
23
23
|
|
24
|
-
canvas.rect(124,
|
24
|
+
canvas.rect(124, 698).styles(:fill=>'none',:stroke=>'blue')
|
25
25
|
end
|
26
26
|
|
27
27
|
rvg.draw.write('writing_mode01.gif')
|
data/doc/ilist.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for
|
7
|
+
"HTML Tidy for Mac OS X (vers 1st September 2004), see www.w3.org" />
|
8
8
|
|
9
9
|
<title>RMagick: class ImageList</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
@@ -286,7 +286,7 @@ imagelist.scene » 10
|
|
286
286
|
<div class="sig">
|
287
287
|
<h3 id="array_methods">Array methods</h3>
|
288
288
|
|
289
|
-
<p
|
289
|
+
<p> </p>
|
290
290
|
</div>
|
291
291
|
|
292
292
|
<div class="desc">
|
@@ -451,7 +451,9 @@ imagelist.animate { self.server_name = "other:0.0" }
|
|
451
451
|
<p><a href="#ImageList.display">display</a></p>
|
452
452
|
|
453
453
|
<h4>Note</h4>
|
454
|
-
|
454
|
+
|
455
|
+
<p>The animate method is not supported on native MS
|
456
|
+
Windows.</p>
|
455
457
|
|
456
458
|
<h4>Magick API</h4>
|
457
459
|
|
data/doc/imusage.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for
|
7
|
+
"HTML Tidy for Mac OS X (vers 1st September 2004), see www.w3.org" />
|
8
8
|
|
9
9
|
<title>RMagick: ImageMagick/GraphicsMagick Conventions</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
@@ -60,7 +60,7 @@
|
|
60
60
|
padding-left: 5px;
|
61
61
|
position: relative;
|
62
62
|
left: -100px;
|
63
|
-
background-image: url(
|
63
|
+
background-image: url(ex/images/graydient230x6.gif);
|
64
64
|
background-repeat: repeat-y;
|
65
65
|
}
|
66
66
|
|
@@ -98,7 +98,7 @@
|
|
98
98
|
|
99
99
|
<h2 id="formats">Image formats and filenames</h2>
|
100
100
|
|
101
|
-
<p>×Magick supports over
|
101
|
+
<p>×Magick supports over 90 major <a href=
|
102
102
|
"http://www.imagemagick.org/www/formats.html">image
|
103
103
|
formats</a>.</p>
|
104
104
|
|
data/doc/rvg.html
CHANGED
@@ -131,6 +131,14 @@
|
|
131
131
|
"rvgstyle.html">styles</a> method, the <a href=
|
132
132
|
"rvgshape.html">shape methods</a> and the <a href=
|
133
133
|
"rvgxform.html">transform methods</a>.</p>
|
134
|
+
|
135
|
+
<h3>Units</h3>
|
136
|
+
|
137
|
+
<div class="toccol">
|
138
|
+
<ul>
|
139
|
+
<li><a href="#units">Units conversion methods</a></li>
|
140
|
+
</ul>
|
141
|
+
</div>
|
134
142
|
</div>
|
135
143
|
|
136
144
|
<h2 class="methods">class methods</h2>
|
@@ -151,7 +159,7 @@
|
|
151
159
|
render shapes, text, and raster images in the container.</p>
|
152
160
|
|
153
161
|
<p>An RVG object is always the outermost container for a
|
154
|
-
drawing. Call the <a href="#
|
162
|
+
drawing. Call the <a href="#RVG_draw">draw</a> method on the
|
155
163
|
returned RVG object to produce the final image.</p>
|
156
164
|
|
157
165
|
<h4>Arguments</h4>
|
@@ -166,9 +174,10 @@
|
|
166
174
|
<p>Otherwise, wid<span class="arg">th</span> and <span class=
|
167
175
|
"arg">height</span> specify the area of the viewbox. If the RVG
|
168
176
|
object will be used as an argument to the <a href=
|
169
|
-
"#
|
170
|
-
and <span class="arg">height</span> may be
|
171
|
-
specified as arguments to
|
177
|
+
"rvguse.html#use">use</a> method, then <span class=
|
178
|
+
"arg">width</span> and <span class="arg">height</span> may be
|
179
|
+
omitted here, then specified as arguments to
|
180
|
+
<code>use</code>.</p>
|
172
181
|
|
173
182
|
<h4>Returns</h4>
|
174
183
|
|
@@ -183,9 +192,10 @@
|
|
183
192
|
"arg">width</span> and <span class="arg">height</span>
|
184
193
|
arguments are omitted in the <code>RVG.new</code> call.
|
185
194
|
Instead, the viewport width and height are specified as
|
186
|
-
arguments to 4 invocations of <a href=
|
187
|
-
<code>use</code> specifies a
|
188
|
-
same RVG object draws 4
|
195
|
+
arguments to 4 invocations of <a href=
|
196
|
+
"rvguse.html#use">use</a>. Each <code>use</code> specifies a
|
197
|
+
different viewport size, so the same RVG object draws 4
|
198
|
+
different-sized targets.</p>
|
189
199
|
|
190
200
|
<p>Click the image to see the example script.</p>
|
191
201
|
|
@@ -195,7 +205,7 @@
|
|
195
205
|
|
196
206
|
<h4>See also</h4>
|
197
207
|
|
198
|
-
<p><a href="
|
208
|
+
<p><a href="rvggroup.html">Group</a></p>
|
199
209
|
</div>
|
200
210
|
|
201
211
|
<h2 class="methods">attributes</h2>
|
@@ -879,6 +889,79 @@ canvas.background_position = :scaled
|
|
879
889
|
"#RVG_preserve_aspect_ratio">preserve_aspect_ratio</a></p>
|
880
890
|
</div>
|
881
891
|
|
892
|
+
<h2 id="units" class="methods">Units</h2>
|
893
|
+
|
894
|
+
<p>RVG supports a subset of the unit identifiers defined by the
|
895
|
+
SVG specification. In RVG, unit identifiers are methods in the
|
896
|
+
Float and Fixnum classes. The units are (for the most part)
|
897
|
+
defined in terms of "dots per inch," accordingly, the unit
|
898
|
+
identifier methods are added only if the value</p>
|
899
|
+
<pre>
|
900
|
+
Magick::RVG.dpi = NN
|
901
|
+
</pre>
|
902
|
+
|
903
|
+
<p>is defined, where NN is the number of "dots" (pixels) per inch
|
904
|
+
you wish to use. (Hint: 90 is a good default.)</p>
|
905
|
+
|
906
|
+
<p>For example, to specify a length of 10 inches, you can use</p>
|
907
|
+
<pre>
|
908
|
+
Magick::RVG.dpi = 90
|
909
|
+
length = 10.in # => 900 pixels
|
910
|
+
</pre>
|
911
|
+
|
912
|
+
<p>If the dpi is defined, the following methods are added to
|
913
|
+
<code>Float</code> and <code>Fixnum</code></p>
|
914
|
+
|
915
|
+
<dl>
|
916
|
+
<dt>px</dt>
|
917
|
+
|
918
|
+
<dd>Pixel. The default unit of measurement.</dd>
|
919
|
+
|
920
|
+
<dt>in</dt>
|
921
|
+
|
922
|
+
<dd>Converts inches to pixels</dd>
|
923
|
+
|
924
|
+
<dt>mm</dt>
|
925
|
+
|
926
|
+
<dd>Converts millimeters to pixels</dd>
|
927
|
+
|
928
|
+
<dt>cm</dt>
|
929
|
+
|
930
|
+
<dd>Converts centimeters to pixels</dd>
|
931
|
+
|
932
|
+
<dt>pt</dt>
|
933
|
+
|
934
|
+
<dd>Converts points to pixels. There are 72 points to the
|
935
|
+
inch.</dd>
|
936
|
+
|
937
|
+
<dt>pc</dt>
|
938
|
+
|
939
|
+
<dd>Converts picas to pixels. There are 12 points to the
|
940
|
+
pica.</dd>
|
941
|
+
|
942
|
+
<dt>deg</dt>
|
943
|
+
|
944
|
+
<dd>Degrees. The default unit of rotation.</dd>
|
945
|
+
|
946
|
+
<dt>rad</dt>
|
947
|
+
|
948
|
+
<dd>Converts radians to degrees.</dd>
|
949
|
+
|
950
|
+
<dt>grad</dt>
|
951
|
+
|
952
|
+
<dd>Converts grads to degrees. There are 400 grads in a
|
953
|
+
circle.</dd>
|
954
|
+
|
955
|
+
<dt>pct</dt>
|
956
|
+
|
957
|
+
<dd>This conversion takes an numeric argument and returns a
|
958
|
+
percentage of the argument. For example 20.pct(150) ->
|
959
|
+
30</dd>
|
960
|
+
</dl>
|
961
|
+
|
962
|
+
<p>SVG also supports <em>em</em> and <em>ex</em>, which are
|
963
|
+
measurements based on the font size. RVG does not.</p>
|
964
|
+
|
882
965
|
<p class="spacer"> </p>
|
883
966
|
|
884
967
|
<div class="nav">
|
data/doc/rvgimage.html
CHANGED
@@ -92,7 +92,7 @@
|
|
92
92
|
the <code>image</code> method in the <a href=
|
93
93
|
"rvg.html#RVG_image">RVG</a>, <a href=
|
94
94
|
"rvggroup.html#image">RVG::Group</a>, or <a href=
|
95
|
-
"rvgpattern.html">RVG::Pattern</a> classes.</p>
|
95
|
+
"rvgpattern.html#image">RVG::Pattern</a> classes.</p>
|
96
96
|
|
97
97
|
<h4>Arguments</h4>
|
98
98
|
|
@@ -166,6 +166,8 @@
|
|
166
166
|
<h2 class="methods">instance methods</h2>
|
167
167
|
|
168
168
|
<div class="sig">
|
169
|
+
<h3 id="preserve_aspect_ratio">preserve_aspect_ratio</h3>
|
170
|
+
|
169
171
|
<p><span class=
|
170
172
|
"arg">image</span>.preserve_aspect_ratio(<span class=
|
171
173
|
"arg">align</span>, <span class=
|
@@ -274,7 +276,7 @@
|
|
274
276
|
<h4>See Also</h4>
|
275
277
|
|
276
278
|
<p><a href=
|
277
|
-
"#RVG_preserve_aspect_ratio">RVG#preserve_aspect_ratio</a></p>
|
279
|
+
"rvg.html#RVG_preserve_aspect_ratio">RVG#preserve_aspect_ratio</a></p>
|
278
280
|
</div>
|
279
281
|
|
280
282
|
<p class="spacer"> </p>
|
data/doc/rvgshape.html
CHANGED
@@ -250,7 +250,14 @@
|
|
250
250
|
|
251
251
|
<p><span class="arg">obj</span>.polygon(<span class=
|
252
252
|
"arg">x1</span>, y1, <span class="arg">x2</span>, <span class=
|
253
|
-
"arg">y2</span>...) -> <span class=
|
253
|
+
"arg">y2</span>...) -> <span class=
|
254
|
+
"arg">aPolygon</span><br />
|
255
|
+
<span class="arg">obj</span>.polygon(<span class=
|
256
|
+
"arg">array</span>) -> <span class=
|
257
|
+
"arg">aPolygon</span><br />
|
258
|
+
<span class="arg">obj</span>.polygon(<span class=
|
259
|
+
"arg">array1</span>, <span class="arg">array2</span>) ->
|
260
|
+
<span class="arg">aPolygon</span></p>
|
254
261
|
</div>
|
255
262
|
|
256
263
|
<div class="desc">
|
@@ -261,8 +268,33 @@
|
|
261
268
|
|
262
269
|
<h5>Arguments</h5>
|
263
270
|
|
264
|
-
<p>
|
265
|
-
|
271
|
+
<p>The arguments to <code>polygon</code> and <a href=
|
272
|
+
"#polyline">polyline</a> can be</p>
|
273
|
+
|
274
|
+
<ol>
|
275
|
+
<li>At least 4 numbers that describe the [x, y] coordinates
|
276
|
+
of the points of the polygon/polyline.</li>
|
277
|
+
|
278
|
+
<li>One array containing at least 4 numbers.</li>
|
279
|
+
|
280
|
+
<li>Two arrays. The first array is a list of x-coordinates.
|
281
|
+
The second array is a list of y-coordinates. Both arrays must
|
282
|
+
have at least one element. If one array is shorter than the
|
283
|
+
other, the shorter array is extended by duplicating its
|
284
|
+
elements as necessary. The combined arrays must describe at
|
285
|
+
least 2 pairs of [x,y] coordinates. For example
|
286
|
+
<pre>
|
287
|
+
x = [1, 3, 5, 7, 9]
|
288
|
+
y = [2,4]
|
289
|
+
canvas.polygon(x, y)
|
290
|
+
# is equivalent to canvas.polygon(1,2, 3,4, 5,2, 7,4, 9,2)
|
291
|
+
</pre>
|
292
|
+
</li>
|
293
|
+
</ol>
|
294
|
+
|
295
|
+
<p>It is an error to specify an odd number of coordinates.
|
296
|
+
Array arguments can be any objects that can be converted to
|
297
|
+
arrays by the Kernel#Array method.</p>
|
266
298
|
|
267
299
|
<h5>Example</h5>
|
268
300
|
|
@@ -277,7 +309,13 @@
|
|
277
309
|
<p><span class="arg">obj</span>.polyline(<span class=
|
278
310
|
"arg">x1</span>, y1, <span class="arg">x2</span>, <span class=
|
279
311
|
"arg">y2</span>...) -> <span class=
|
280
|
-
"arg">
|
312
|
+
"arg">aPolyline</span><br />
|
313
|
+
<span class="arg">obj</span>.polyline(<span class=
|
314
|
+
"arg">array</span>) -> <span class=
|
315
|
+
"arg">aPolyline</span><br />
|
316
|
+
<span class="arg">obj</span>.polyline(<span class=
|
317
|
+
"arg">array1</span>, <span class="arg">array2</span>) ->
|
318
|
+
<span class="arg">aPolyline</span></p>
|
281
319
|
</div>
|
282
320
|
|
283
321
|
<div class="desc">
|
@@ -288,8 +326,7 @@
|
|
288
326
|
|
289
327
|
<h5>Arguments</h5>
|
290
328
|
|
291
|
-
<p>
|
292
|
-
to define an odd number of points.</p>
|
329
|
+
<p>See <a href="#polygon">polygon</a></p>
|
293
330
|
|
294
331
|
<h5>Example</h5>
|
295
332
|
|
data/doc/rvgstyle.html
CHANGED
@@ -43,6 +43,8 @@
|
|
43
43
|
<h3>instance methods</h3>
|
44
44
|
|
45
45
|
<div>
|
46
|
+
class methods
|
47
|
+
|
46
48
|
<ul>
|
47
49
|
<li><a href="#styles">styles</a></li>
|
48
50
|
</ul>
|
@@ -88,7 +90,8 @@
|
|
88
90
|
<dt>:clip_path</dt>
|
89
91
|
|
90
92
|
<dd>An outline used to clip a shape or collection of shapes.
|
91
|
-
The value is an <a href="rvgclip.html#new">clipping
|
93
|
+
The value is an <a href="rvgclip.html#new">clipping
|
94
|
+
path</a>.</dd>
|
92
95
|
|
93
96
|
<dt>:clip_rule</dt>
|
94
97
|
|
data/doc/rvgtspan.html
CHANGED
@@ -100,10 +100,10 @@
|
|
100
100
|
<dd>A string. If present, this string is drawn at the current
|
101
101
|
text position. By default the string is positioned with the
|
102
102
|
lower-left corner of the first glyph at the current text
|
103
|
-
position. Use the <a href=
|
104
|
-
style to
|
105
|
-
|
106
|
-
the string.</dd>
|
103
|
+
position. Use the <a href=
|
104
|
+
"rvgtext.html#text_anchor">:text_anchor</a> style to
|
105
|
+
override this behavior. After the string is rendered, the
|
106
|
+
current text position is moved to the end of the string.</dd>
|
107
107
|
|
108
108
|
<dt>x, y</dt>
|
109
109
|
|
data/doc/usage.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for
|
7
|
+
"HTML Tidy for Mac OS X (vers 1st September 2004), see www.w3.org" />
|
8
8
|
|
9
9
|
<title>RMagick: How to use RMagick</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
@@ -28,7 +28,7 @@
|
|
28
28
|
position: relative;
|
29
29
|
left: -100px;
|
30
30
|
padding-left: 5px;
|
31
|
-
background-image: url(
|
31
|
+
background-image: url(ex/images/graydient230x6.gif);
|
32
32
|
background-repeat: repeat-y;
|
33
33
|
color: black;
|
34
34
|
}
|
@@ -421,6 +421,14 @@ exit
|
|
421
421
|
<dd>Return the maximum and minimum intensity values for one
|
422
422
|
or more channels in the image</dd>
|
423
423
|
|
424
|
+
<dt><a href="image1.html#clone">clone</a></dt>
|
425
|
+
|
426
|
+
<dd>Return a shallow copy of the image</dd>
|
427
|
+
|
428
|
+
<dt class="ilist"><a href="ilist.html#clone">clone</a></dt>
|
429
|
+
|
430
|
+
<dd class="ilist">Return a shallow copy of the imagelist</dd>
|
431
|
+
|
424
432
|
<dt><a href=
|
425
433
|
"image1.html#color_histogram">color_histogram</a></dt>
|
426
434
|
|
@@ -439,6 +447,14 @@ exit
|
|
439
447
|
|
440
448
|
<dd>Compute the difference between two images</dd>
|
441
449
|
|
450
|
+
<dt><a href="image1.html#dup">dup</a></dt>
|
451
|
+
|
452
|
+
<dd>Return a shallow copy of the image</dd>
|
453
|
+
|
454
|
+
<dt class="ilist"><a href="ilist.html#dup">dup</a></dt>
|
455
|
+
|
456
|
+
<dd class="ilist">Return a shallow copy of the imagelist</dd>
|
457
|
+
|
442
458
|
<dt><a href="image1.html#each_profile">each_profile</a></dt>
|
443
459
|
|
444
460
|
<dd>Iterate over all the profiles associated with the
|
@@ -752,8 +768,9 @@ exit
|
|
752
768
|
<dt class="ilist"><a href=
|
753
769
|
"ilist.html#deconstruct">deconstruct</a></dt>
|
754
770
|
|
755
|
-
<dd class="ilist">
|
756
|
-
|
771
|
+
<dd class="ilist">Construct a new imagelist containing images
|
772
|
+
that include only the changed pixels between each image and
|
773
|
+
its successor</dd>
|
757
774
|
|
758
775
|
<dt class="ilist"><a href=
|
759
776
|
"ilist.html#flatten_images">flatten_images</a></dt>
|
@@ -1322,7 +1339,7 @@ exit
|
|
1322
1339
|
use radians instead of degrees.</p>
|
1323
1340
|
</div>
|
1324
1341
|
|
1325
|
-
<p class="spacer"
|
1342
|
+
<p class="spacer"> </p>
|
1326
1343
|
|
1327
1344
|
<div class="nav">
|
1328
1345
|
« <a href="index.html">Prev</a> | <a href=
|
data/ext/RMagick/MANIFEST
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
MANIFEST for RMagick-1.8.
|
1
|
+
MANIFEST for RMagick-1.8.1 - 18:37:25 05/22/05
|
2
2
|
|
3
3
|
configure
|
4
4
|
README.html
|
@@ -34,6 +34,7 @@ metaconfig.in
|
|
34
34
|
install.rb
|
35
35
|
configure.ac
|
36
36
|
README.txt
|
37
|
+
README-Mac-OSX.txt
|
37
38
|
Makefile.in
|
38
39
|
ChangeLog
|
39
40
|
ext/RMagick/rmutil.c
|
data/ext/RMagick/extconf.rb.in
CHANGED
@@ -6,7 +6,7 @@ require 'mkmf'
|
|
6
6
|
# Pass along Ruby's version number
|
7
7
|
VERSION_NUMBER = '0x'+RUBY_VERSION.tr('.','')
|
8
8
|
|
9
|
-
$CFLAGS = "-
|
9
|
+
$CFLAGS = "-Wall -g @CFLAGS@"
|
10
10
|
$CPPFLAGS = "-DRUBY_VERSION=#{VERSION_NUMBER} @CPPFLAGS@"
|
11
11
|
|
12
12
|
if RUBY_VERSION >= '1.8.0'
|
data/ext/RMagick/rmagick.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmagick.h,v 1.
|
1
|
+
/* $Id: rmagick.h,v 1.83 2005/05/06 00:28:41 rmagick Exp $ */
|
2
2
|
/*=============================================================================
|
3
3
|
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmagick.h
|
@@ -61,6 +61,10 @@
|
|
61
61
|
#undef DegreesToRadians // defined in ImageMagick.h in 6.0.2
|
62
62
|
#define DegreesToRadians(x) ((x)*3.14159265358979323846/180.0)
|
63
63
|
|
64
|
+
#define LMAX(a,b) ((((long)(a))>((long)(b)))?((long)(a)):((long)(b)))
|
65
|
+
#define FMAX(a,b) ((((double)(a))>((double)(b)))?((double)(a)):((double)(b)))
|
66
|
+
#define FMIN(a,b) ((((double)(a))<=((double)(b)))?((double)(a)):((double)(b)))
|
67
|
+
|
64
68
|
typedef ImageInfo Info; // Make type name match class name
|
65
69
|
typedef PixelPacket Pixel;
|
66
70
|
|
@@ -101,6 +101,8 @@
|
|
101
101
|
/* Introduced in IM 5.5.6 */
|
102
102
|
#undef HAVE_IMAGE_EXTRACT_INFO
|
103
103
|
/* Introduced in IM 6.0.0 */
|
104
|
+
#undef HAVE_IMAGE_QUALITY
|
105
|
+
/* Introduced in IM 6.0.0 */
|
104
106
|
#undef HAVE_IMAGE_ORIENTATION
|
105
107
|
/* Introduced in IM 5.5.6 */
|
106
108
|
#undef HAVE_IMAGEINFO_NUMBER_SCENES
|
data/ext/RMagick/rmfill.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmfill.c,v 1.
|
1
|
+
/* $Id: rmfill.c,v 1.12 2005/05/06 00:28:41 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
3
|
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmfill.c
|
@@ -168,7 +168,7 @@ vertical_fill(
|
|
168
168
|
// Keep in mind that x1 could be < 0 or > image->columns. If steps
|
169
169
|
// is negative, swap the start and end colors and use the absolute
|
170
170
|
// value.
|
171
|
-
steps =
|
171
|
+
steps = FMAX(x1, ((long)image->columns)-x1);
|
172
172
|
if (steps < 0)
|
173
173
|
{
|
174
174
|
PixelPacket t = *start_color;
|
@@ -240,7 +240,7 @@ horizontal_fill(
|
|
240
240
|
|
241
241
|
// Bear in mind that y1 could be < 0 or > image->rows. If steps is
|
242
242
|
// negative, swap the start and end colors and use the absolute value.
|
243
|
-
steps =
|
243
|
+
steps = FMAX(y1, ((long)image->rows)-y1);
|
244
244
|
if (steps < 0)
|
245
245
|
{
|
246
246
|
PixelPacket t = *start_color;
|
@@ -323,16 +323,16 @@ v_diagonal_fill(
|
|
323
323
|
|
324
324
|
if (d1 < 0 && d2 < 0)
|
325
325
|
{
|
326
|
-
steps +=
|
326
|
+
steps += FMAX(fabs(d1),fabs(d2));
|
327
327
|
}
|
328
328
|
else if (d1 > image->rows && d2 > image->rows)
|
329
329
|
{
|
330
|
-
steps +=
|
330
|
+
steps += FMAX(d1-image->rows, d2-image->rows);
|
331
331
|
}
|
332
332
|
|
333
|
-
d1 =
|
334
|
-
d2 =
|
335
|
-
steps +=
|
333
|
+
d1 = FMAX(b, image->rows-b);
|
334
|
+
d2 = FMAX(d2, image->rows-d2);
|
335
|
+
steps += FMAX(d1, d2);
|
336
336
|
|
337
337
|
// If the line is entirely > image->rows, swap the start & end color
|
338
338
|
if (steps < 0)
|
@@ -404,16 +404,16 @@ h_diagonal_fill(
|
|
404
404
|
// the number of steps.
|
405
405
|
if (d1 < 0 && d2 < 0)
|
406
406
|
{
|
407
|
-
steps +=
|
407
|
+
steps += FMAX(fabs(d1),fabs(d2));
|
408
408
|
}
|
409
409
|
else if (d1 > image->columns && d2 > image->columns)
|
410
410
|
{
|
411
|
-
steps +=
|
411
|
+
steps += FMAX(fabs(image->columns-d1),fabs(image->columns-d2));
|
412
412
|
}
|
413
413
|
|
414
|
-
d1 =
|
415
|
-
d2 =
|
416
|
-
steps +=
|
414
|
+
d1 = FMAX(d1, image->columns-d1);
|
415
|
+
d2 = FMAX(d2, image->columns-d2);
|
416
|
+
steps += FMAX(d1, d2);
|
417
417
|
|
418
418
|
// If the line is entirely > image->columns, swap the start & end color
|
419
419
|
if (steps < 0)
|
data/ext/RMagick/rmimage.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmimage.c,v 1.
|
1
|
+
/* $Id: rmimage.c,v 1.98 2005/05/06 00:28:41 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
3
|
| Copyright (C) 2005 by Timothy P. Hunter
|
4
4
|
| Name: rmimage.c
|
@@ -6476,8 +6476,8 @@ Image_shadow(int argc, VALUE *argv, VALUE self)
|
|
6476
6476
|
{
|
6477
6477
|
rb_warning("shadow will be transparent - opacity %g very small", opacity);
|
6478
6478
|
}
|
6479
|
-
opacity =
|
6480
|
-
opacity =
|
6479
|
+
opacity = FMIN(opacity, 1.0);
|
6480
|
+
opacity = FMAX(opacity, 0.01);
|
6481
6481
|
opacity *= 100.0;
|
6482
6482
|
case 3:
|
6483
6483
|
sigma = NUM2DBL(argv[2]);
|
data/lib/rvg/embellishable.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# $Id: embellishable.rb,v 1.
|
2
|
+
# $Id: embellishable.rb,v 1.4 2005/05/22 22:31:30 rmagick Exp $
|
3
3
|
# Copyright (C) 2005 Timothy P. Hunter
|
4
4
|
#++
|
5
5
|
|
@@ -111,7 +111,34 @@ class Magick::RVG
|
|
111
111
|
|
112
112
|
end # class Rect
|
113
113
|
|
114
|
-
class
|
114
|
+
class PolyShape < Shape
|
115
|
+
|
116
|
+
def polypoints(points)
|
117
|
+
case points.length
|
118
|
+
when 1
|
119
|
+
points = Array(points[0])
|
120
|
+
when 2
|
121
|
+
x_coords = Array(points[0])
|
122
|
+
y_coords = Array(points[1])
|
123
|
+
unless x_coords.length > 0 && y_coords.length > 0
|
124
|
+
raise ArgumentError, "array arguments must contain at least one point"
|
125
|
+
end
|
126
|
+
n = x_coords.length - y_coords.length
|
127
|
+
short = n > 0 ? y_coords : x_coords
|
128
|
+
olen = short.length
|
129
|
+
n.abs.times {|x| short << short[x % olen]}
|
130
|
+
points = x_coords.zip(y_coords).flatten
|
131
|
+
end
|
132
|
+
n = points.length
|
133
|
+
if n < 4 || n % 2 != 0
|
134
|
+
raise ArgumentError, "insufficient/odd number of points specified: #{n}"
|
135
|
+
end
|
136
|
+
return RVG.convert_to_float(*points)
|
137
|
+
end
|
138
|
+
|
139
|
+
end # class PolyShape
|
140
|
+
|
141
|
+
class Polygon < PolyShape
|
115
142
|
|
116
143
|
# Draws a polygon. The arguments are [<tt>x</tt>, <tt>y</tt>] pairs that
|
117
144
|
# define the points that make up the polygon. At least two
|
@@ -121,17 +148,13 @@ class Magick::RVG
|
|
121
148
|
# Use the RVG::ShapeConstructors#polygon method to create Polygon objects in a container.
|
122
149
|
def initialize(*points)
|
123
150
|
super()
|
124
|
-
n = points.length
|
125
|
-
if n < 4 || n % 2 != 0
|
126
|
-
raise ArgumentError, "insufficient/odd number of points specified: #{n}"
|
127
|
-
end
|
128
151
|
@primitive = :polygon
|
129
|
-
@args =
|
152
|
+
@args = polypoints(points)
|
130
153
|
end
|
131
154
|
|
132
155
|
end # class Polygon
|
133
156
|
|
134
|
-
class Polyline <
|
157
|
+
class Polyline < PolyShape
|
135
158
|
|
136
159
|
# Draws a polyline. The arguments are [<tt>x</tt>, <tt>y</tt>] pairs that
|
137
160
|
# define the points that make up the polyline. At least two
|
@@ -139,10 +162,7 @@ class Magick::RVG
|
|
139
162
|
# Use the RVG::ShapeConstructors#polyline method to create Polyline objects in a container.
|
140
163
|
def initialize(*points)
|
141
164
|
super()
|
142
|
-
|
143
|
-
if n < 4 || n % 2 != 0
|
144
|
-
raise ArgumentError, "insufficient/odd number of points specified: #{n}"
|
145
|
-
end
|
165
|
+
points = polypoints(points)
|
146
166
|
@primitive = :polyline
|
147
167
|
@args = RVG.convert_to_float(*points)
|
148
168
|
end
|
data/lib/rvg/misc.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# $Id: misc.rb,v 1.
|
1
|
+
# $Id: misc.rb,v 1.5 2005/05/22 22:31:30 rmagick Exp $
|
2
2
|
# Copyright (C) 2005 Timothy P. Hunter
|
3
3
|
class Magick::RVG
|
4
4
|
|
@@ -51,7 +51,7 @@ class Magick::RVG
|
|
51
51
|
begin
|
52
52
|
fargs = args.collect { |a| (allow_nil && a.nil?) ? a : Float(a) }
|
53
53
|
rescue ArgumentError, TypeError
|
54
|
-
raise ArgumentError, self.fmsg(args)
|
54
|
+
raise ArgumentError, self.fmsg(*args)
|
55
55
|
end
|
56
56
|
return fargs
|
57
57
|
end
|
data/rmagick.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'date'
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = %q{rmagick}
|
4
|
-
s.version = "1.8.
|
4
|
+
s.version = "1.8.1"
|
5
5
|
s.date = Date.today.to_s
|
6
6
|
s.summary = %q{RMagick is an interface between the Ruby programming language and the ImageMagick and GraphicsMagick image processing libraries.}
|
7
7
|
s.description =<<DESCRIPTION
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.3
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rmagick
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.8.
|
7
|
-
date: 2005-
|
6
|
+
version: 1.8.1
|
7
|
+
date: 2005-05-22
|
8
8
|
summary: RMagick is an interface between the Ruby programming language and the ImageMagick and GraphicsMagick image processing libraries.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -32,6 +32,7 @@ files:
|
|
32
32
|
- ext
|
33
33
|
- ChangeLog
|
34
34
|
- Makefile.in
|
35
|
+
- README-Mac-OSX.txt
|
35
36
|
- README.txt
|
36
37
|
- configure.ac
|
37
38
|
- install.rb
|