31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper/***********************************************************
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperCopyright 1989, 1998 The Open Group
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperPermission to use, copy, modify, distribute, and sell this software and its
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperdocumentation for any purpose is hereby granted without fee, provided that
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperthe above copyright notice appear in all copies and that both that
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reepercopyright notice and this permission notice appear in supporting
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperdocumentation.
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperThe above copyright notice and this permission notice shall be included in
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperall copies or substantial portions of the Software.
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperExcept as contained in this notice, the name of The Open Group shall not be
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperused in advertising or otherwise to promote the sale, use or other dealings
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperin this Software without prior written authorization from The Open Group.
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperCopyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts.
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper All Rights Reserved
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperPermission to use, copy, modify, and distribute this software and its
5c39d8f041417518a02ce2c941d96c2d33b2a364Mark de Reeperdocumentation for any purpose and without fee is hereby granted,
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperprovided that the above copyright notice appear in all copies and that
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperboth that copyright notice and this permission notice appear in
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reepersupporting documentation, and that the name of Digital not be
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeperused in advertising or publicity pertaining to distribution of the
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reepersoftware without specific, written prior permission.
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de ReeperSOFTWARE.
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper******************************************************************/
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper#ifndef MISPANS_H
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper#define MISPANS_H
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reepertypedef struct {
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper int count; /* number of spans */
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper DDXPointPtr points; /* pointer to list of start points */
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper int *widths; /* pointer to list of widths */
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper} Spans;
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reepertypedef struct {
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper int size; /* Total number of *Spans allocated */
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper int count; /* Number of *Spans actually in group */
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper Spans *group; /* List of Spans */
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper int ymin, ymax; /* Min, max y values encountered */
31734da27b3f913bfb1da241a2e2571f33ab4629Mark de Reeper} SpanGroup;
/* Initialize SpanGroup. MUST BE DONE before use. */
extern _X_EXPORT void miInitSpanGroup(
SpanGroup * /*spanGroup*/
);
/* Add a Spans to a SpanGroup. The spans MUST BE in y-sorted order */
extern _X_EXPORT void miAppendSpans(
SpanGroup * /*spanGroup*/,
SpanGroup * /*otherGroup*/,
Spans * /*spans*/
);
/* Paint a span group, insuring that each pixel is painted at most once */
extern _X_EXPORT void miFillUniqueSpanGroup(
DrawablePtr /*pDraw*/,
GCPtr /*pGC*/,
SpanGroup * /*spanGroup*/
);
/* Free up data in a span group. MUST BE DONE or you'll suffer memory leaks */
extern _X_EXPORT void miFreeSpanGroup(
SpanGroup * /*spanGroup*/
);
/* Rops which must use span groups */
#define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2)
#define miSpansEasyRop(rop) (!miSpansCarefulRop(rop))
#endif /* MISPANS_H */