home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / mi / mispans.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-05  |  2.3 KB  |  54 lines

  1. /***********************************************************
  2. Copyright 1989 by Digital Equipment Corporation, Maynard, Massachusetts,
  3. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  4.  
  5.                         All Rights Reserved
  6.  
  7. Permission to use, copy, modify, and distribute this software and its 
  8. documentation for any purpose and without fee is hereby granted, 
  9. provided that the above copyright notice appear in all copies and that
  10. both that copyright notice and this permission notice appear in 
  11. supporting documentation, and that the names of Digital or MIT not be
  12. used in advertising or publicity pertaining to distribution of the
  13. software without specific, written prior permission.  
  14.  
  15. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  16. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  17. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  18. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  19. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  20. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21. SOFTWARE.
  22.  
  23. ******************************************************************/
  24.  
  25. /* $XConsortium: mispans.h,v 5.0 89/11/05 13:52:39 rws Exp $ */
  26.  
  27. typedef struct {
  28.     int         count;        /* number of spans            */
  29.     DDXPointPtr points;        /* pointer to list of start points  */
  30.     int         *widths;    /* pointer to list of widths        */
  31. } Spans;
  32.  
  33. typedef struct {
  34.     int        size;        /* Total number of *Spans allocated    */
  35.     int        count;        /* Number of *Spans actually in group   */
  36.     Spans       *group;        /* List of Spans            */
  37.     int        ymin, ymax;    /* Min, max y values encountered    */
  38. } SpanGroup;
  39.  
  40. /* Initialize SpanGroup.  MUST BE DONE before use. */
  41. extern void miInitSpanGroup(/* spanGroup */);
  42.  
  43. /* Add a Spans to a SpanGroup.  The spans MUST BE in y-sorted order */
  44. extern void miAppendSpans(/* spanGroup, spans */);
  45.  
  46. /* Paint a span group, possibly with some overlap */
  47. extern void miFillSpanGroup(/* spanGroup */);
  48.  
  49. /* Paint a span group, insuring that each pixel is painted at most once */
  50. extern void miFillUniqueSpanGroup(/* spanGroup */);
  51.  
  52. /* Free up data in a span group.  MUST BE DONE or you'll suffer memory leaks */
  53. extern void miFreeSpanGroup(/* spanGroup */);
  54.