45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright © 2000 SuSE, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Permission to use, copy, modify, distribute, and sell this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsync * documentation for any purpose is hereby granted without fee, provided that
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the above copyright notice appear in all copies and that both that
45e9809aff7304721fddb95654901b32195c9c7avboxsync * copyright notice and this permission notice appear in supporting
45e9809aff7304721fddb95654901b32195c9c7avboxsync * documentation, and that the name of SuSE not be used in advertising or
45e9809aff7304721fddb95654901b32195c9c7avboxsync * publicity pertaining to distribution of the software without specific,
45e9809aff7304721fddb95654901b32195c9c7avboxsync * written prior permission. SuSE makes no representations about the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * suitability of this software for any purpose. It is provided "as is"
45e9809aff7304721fddb95654901b32195c9c7avboxsync * without express or implied warranty.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
45e9809aff7304721fddb95654901b32195c9c7avboxsync * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
45e9809aff7304721fddb95654901b32195c9c7avboxsync * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
45e9809aff7304721fddb95654901b32195c9c7avboxsync * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
45e9809aff7304721fddb95654901b32195c9c7avboxsync * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
45e9809aff7304721fddb95654901b32195c9c7avboxsync * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Author: Keith Packard, SuSE, Inc.
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MI_MAX_INDEXED 256 /* XXX depth must be <= 8 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define miCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define miIndexToEnt15(mif,rgb15) ((mif)->ent[rgb15])
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define miIndexToEnt24(mif,rgb24) miIndexToEnt15(mif,miCvtR8G8B8to15(rgb24))
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)])
45e9809aff7304721fddb95654901b32195c9c7avboxsyncmiPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncmiTrapezoidBounds (int ntrap, xTrapezoid *traps, BoxPtr box);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncmiPointFixedBounds (int npoint, xPointFixed *points, BoxPtr bounds);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncmiTriangleBounds (int ntri, xTriangle *tris, BoxPtr bounds);
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* _MIPICT_H_ */