shhcards - library for displaying game cards on X11.
====================================================

This library is for programming card games. It provides a set of
pixmaps, and a few functions for displaying the pixmaps from X11
programs.


Pixmaps
-------

There are three kinds of pixmaps: The 52 card front sides, a few
alternative card backs, and some outlines suitable for marking
locations of piles on the board. You'll have to scan the xpm files to
choose between the two latter.


Functions
---------

The library provides three functions:

void cardInit(Display *dpy, Drawable d);

	This function must be called before using the cards. It sets
	up pixmaps properly for the given display and drawable. The
	drawable may be the window containing the game board, or it
	may be any other window with the same visual and color depth.
	The function also sets up a graphics context to be used when
	drawing the cards.

void cardFinish(void);

	Releases all pixmaps and other items that were previously set
	up with cardInit().

void cardDraw(Drawable d, int x, int y, int suit, int value);

	This function displays a card in the given drawable, at
	location (x, y) relative to the origin of the drawable. A clip
	mask is used to give round edges of the cards, and transparent
	backgrounds of the card outlines.

	suit is either a card suit (CARD_CLUBS, CARD_DIAMONDS,
	CARD_HEARTS or CARD_SPADES), or a special code to indicate
	drawing of card backgrounds (CARD_BACKGROUND) or card pile
	outlines (CARD_OUTLINE).

	For card suits, the value variable is within the range 1 to 13
	(with no range validity checking). For backgrounds and
	outlines, value counts from 0 to CARD_NUM_BACKS - 1 and
	CARD_NUM_OUTLINES - 1 respectively.


Portability
-----------

The library has (more or less recently) been compiled and `tested' on
the following systems:

	IRIX Release 5.3 IP22
	GNU/Linux 2.0.20
	Solaris

All compilations were done using GNU's gcc, and GNU's make.


Author
------

The program is written by

        Sverre H. Huseby        sverrehu@online.no
        Kurvn. 30               http://home.sol.no/~sverrehu/
        N-0495 Oslo
        Norway

You can use and copy this for _free_, but I would be very happy if you
send me an E-mail and tell me that you use it. If you insist on paying
something, please donate some money to an organization that strives to
make the world a better place for everyone.

I don't like bugs, so please help me removing them by reporting
whatever you find!

