<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>xjig(6) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>

<h2><a name='sect0' href='#toc0'>Name</a></h2>
xjig - the jigsaw puzzle 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>xjig</b> &lt;options&gt; 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<i>XJig</i> is a puzzle,
that tries to replicate a jigsaw puzzle on the screen as close as possible.
As in every jigsaw puzzle, the goal is to set all the pieces together. If
you like, you can watch the time that you spent for it. <p>
Any image-file in
GIF, JPEG, or PPM format can be used as the source for the puzzle, which
is then randomly created regarding the sizes selected by the options.  <p>
The
control should be as intuitive as possible in the way that you will usually
pull the freely rotatable pieces at one edge, drag them to the desired
destination and drop them so they will snap together easily when close
to an neighboured tile. 
<p> 
<h2><a name='sect3' href='#toc3'>Special Effects</a></h2>

<p> Tiles are freely formed and rotatable
with texture mapping routines to give the appearance of a real mess on
the screen. 
<p> Tiles snap together very easy if they are dropped somewhere
close to another matching tile, when turned in the correct direction. 
<p> Puzzles
can be doubled sided so you might have to flip the tiles to the correct
side to let them snap together. 
<p> If the Xserver supports the Shape-Extension,
the tiles can be opened directly on the desktop, which is a pretty showcase,
but you need a very fast machine for really getting this playable. (Any
ideas on how to add double buffering to the shaped-window approach of the
jigsaw are warmly welcome!) 
<p> 
<h2><a name='sect4' href='#toc4'>Controls</a></h2>
The usual way to move the pieces on
the screen should be to drag the piece with the left mouse button to their
destination by pulling them at on edge. The piece will automatically rotate
like if you pull or push them with your fingertip on a table. 
<p> In addition,
the following movements are possible: 
<p> <br>
<pre>click left:<tt> </tt>&nbsp;<tt> </tt>&nbsp;rotate 90 degrees left
click right:<tt> </tt>&nbsp;<tt> </tt>&nbsp;rotate 90 degrees right
click middle:<tt> </tt>&nbsp;<tt> </tt>&nbsp;flip tile to backside
drag left:<tt> </tt>&nbsp;<tt> </tt>&nbsp;rotator drag (as mentionned above)
   +middle:<tt> </tt>&nbsp;<tt> </tt>&nbsp;pause rotator drag for a straight drag
drag middle:<tt> </tt>&nbsp;<tt> </tt>&nbsp;straight drag
   +left:<tt> </tt>&nbsp;<tt> </tt>&nbsp;pause drag for a static rotation
   +click left:<tt> </tt>&nbsp;<tt> </tt>&nbsp;rotate 90 degrees left during drag
   +click right:<tt> </tt>&nbsp;<tt> </tt>&nbsp;rotate 90 degrees right during drag
CTRL+click left:<tt> </tt>&nbsp;<tt> </tt>&nbsp;same as click middle
</pre><p>
The right button has actually the same functionality as the middle button
so that 2 button systems shouldn&rsquo;t have problems. Only the "drag middle+click
right" move will not work in that mode, and the flipping has to be done
with the help of the CTRL-key. 
<p> 
<h2><a name='sect5' href='#toc5'>Options</a></h2>

<h3><a name='sect6' href='#toc6'>Tile Selection</a></h3>

<dl>

<dt><b>-file <i>name</i></b> </dt>
<dd>use the specified
file as the source image for the puzzle </dd>

<dt><b>-side <i>p</i></b> </dt>
<dd>select the side of the image
to be on top, if you don&rsquo;t like the mess with the double sided tiles. </dd>
</dl>

<h3><a name='sect7' href='#toc7'>Size
Selection</a></h3>
<b></b> 
<dl>

<dt><b>-w <i>x</i></b> </dt>
<dd>Select number of tiles in horizontal direction. The Images
are automatically rotated in portrait orientation before they are sliced.
Therefore <i>x</i> usually should be smaller than <i>y</i> of the next option. The default
is four. </dd>

<dt><b>-h <i>y</i></b> </dt>
<dd>Select number of tiles in vertical direction respectively. The
default is six. </dd>

<dt><b>-ts <i>n</i></b> </dt>
<dd>Select average tile width. Instead of explicitly specifying
the number of tiles by using the previous options -w and -h, the average
tile width in pixels can be selected and the values for <i>x</i> and <i>y</i> above are
computed according to to the selected size. </dd>
</dl>

<h3><a name='sect8' href='#toc8'>Image Options</a></h3>

<dl>

<dt><b>-ww <i>x</i></b> </dt>
<dd>Select width
of image in pixels. This can be used to scale the image before playing for
the case that a very large image is the source. </dd>

<dt><b>-wh <i>h</i></b> </dt>
<dd>Select height of image
in pixels. If only one of -ww and -wh, the aspect ratio is kept constant. </dd>

<dt><b>-no_crop</b>
</dt>
<dd>The image is usually automatically cropped, since many images are surrounded
by frames or textual comments. The cropping stops at a reasonable amount
of colors per line or row. If this is not desired of if you want to puzzle
with painted images with few color, you should disable this feature. </dd>

<dt><b>-no_flip</b>
</dt>
<dd>Before tiling takes place, a landscape image is rotated to portrait mode,
which effects successive options like -w or -ww. If this is not desired, you
can switch this feature off. 
<p> </dd>
</dl>

<h3><a name='sect9' href='#toc9'>X-Window options</a></h3>

<dl>

<dt><b>-display <i>name</i></b> </dt>
<dd>Select the display
to connect to. </dd>

<dt><b>-shapes</b> </dt>
<dd>If the SHAPE-extension is supported by your display,
you can use this option to let each puzzle tile appear in its own shaped
window. The results might depend on the behaviour of the window-manager. The
manager is actually advised by the override redirect attribute flag of
the puzzle shapes not to do anything with them. But who knows ... </dd>

<dt><b>-no_shm</b> </dt>
<dd>When
the program was build with support of the MIT-SHM extension, it might crash
when started to display on a remote machine or X-terminal. You can deselect
the usage of the extension with this option. 
<p> </dd>
</dl>

<h3><a name='sect10' href='#toc10'>Miscellaneous</a></h3>

<dl>

<dt><b>-no_anim</b> </dt>
<dd>Turns
off animation of rotation and flipping, for the case the machine isn&rsquo;t fast
enough to make it look nice. 
<p> </dd>
</dl>

<h2><a name='sect11' href='#toc11'>Zooming &amp; Panning</a></h2>
For not losing tiles at the
window border and for getting more workspace, the game has some zooming
and panning features to control the view on your desk. They are controlled
via the keyboard with the following functionality: 
<p> <br>
<pre>Cursor Keys:<tt> </tt>&nbsp;<tt> </tt>&nbsp;Pan View
Page-Up or Add:<tt> </tt>&nbsp;<tt> </tt>&nbsp;Zoom in
Page-Down or Sub:<tt> </tt>&nbsp;<tt> </tt>&nbsp;Zoom out
Home:<tt> </tt>&nbsp;<tt> </tt>&nbsp;Reset to original size
End:<tt> </tt>&nbsp;<tt> </tt>&nbsp;Set maximum zooming to view all tiles
</pre>
<p> The image quality usually suffers from zooming, since gif-images are usually
dithered to be viewed best in their original size. This also applies to
the size options -ww and -wh. 
<p> 
<h2><a name='sect12' href='#toc12'>Color Allocation</a></h2>
The program was tested on PseudoColor-
and TrueColor-displays. On PseudoColor-displays the program might run out
of colors, since colors are very limited and it has to share its colors
with other clients. It tries to share similar colors with other clients.
But if too may color consuming clients are running, the image-quality will
suffer. You should stop other clients in that case or you might quantize
the image to a fewer number of colors with packages like ImageMagick, xv
or netpbm. 
<h2><a name='sect13' href='#toc13'>See Also</a></h2>
<a href='X.1'>X(1)</a>
, <a href='convert.1'>convert(1)</a>
, <a href='xv.1'>xv(1)</a>
, <a href='ppmquant.1'>ppmquant(1)</a>
 
<p> 
<h2><a name='sect14' href='#toc14'>Copyright</a></h2>
Copyright
1996, Helmut Hoenig, Heiligenhaus <br>
<pre>














</pre><p>

<dl>

<dt>email (for any comments):Helmut.Hoenig@hub.desmail (for gifts):   Helmut
Hoenig   Hopfenstrasse 8a   65520 Bad Camberg   GERMANY********************************************************By
the way, I am collecting banknotes! If you want to join into my collection,
get any bill of yourcountry, sign it on the backside and send it to meso
I will pin it on my world map.(Don&rsquo;t forget the exact location for the pin
:-)But you can also just send me a picture postcard ...********************************************************Permission
to use, copy, modify, and distribute this </dt>
<dd>software for any purpose and
without fee is hereby granted, provided that the above copyright notice
appear in all copies. 
<p> </dd>
</dl>

<h3><a name='sect15' href='#toc15'>other fancy things from the author</a></h3>
<br>
<pre>xcol (1990)<tt> </tt>&nbsp;<tt> </tt>&nbsp;- color selector for editing text-files
flying (94/95)<tt> </tt>&nbsp;<tt> </tt>&nbsp;- pool billard simulation
xdefmap (1995)<tt> </tt>&nbsp;<tt> </tt>&nbsp;- enhanced tool for setting up standard colormaps
xmemory (95/96)<tt> </tt>&nbsp;<tt> </tt>&nbsp;- memory with simultaneous multiplayer action
available at ftp.x.org and its mirrors
</pre><p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Special Effects</a></li>
<li><a name='toc4' href='#sect4'>Controls</a></li>
<li><a name='toc5' href='#sect5'>Options</a></li>
<ul>
<li><a name='toc6' href='#sect6'>Tile Selection</a></li>
<li><a name='toc7' href='#sect7'>Size Selection</a></li>
<li><a name='toc8' href='#sect8'>Image Options</a></li>
<li><a name='toc9' href='#sect9'>X-Window options</a></li>
<li><a name='toc10' href='#sect10'>Miscellaneous</a></li>
</ul>
<li><a name='toc11' href='#sect11'>Zooming & Panning</a></li>
<li><a name='toc12' href='#sect12'>Color Allocation</a></li>
<li><a name='toc13' href='#sect13'>See Also</a></li>
<li><a name='toc14' href='#sect14'>Copyright</a></li>
<ul>
<li><a name='toc15' href='#sect15'>other fancy things from the author</a></li>
</ul></ul>
</body>
</html>
