Annotation of researchv9/X11/src/X.V11R1/server/ddx/mi/mipolyrect.c, revision 1.1

1.1     ! root        1: /***********************************************************
        !             2: Copyright 1987 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: /* $Header: mipolyrect.c,v 1.11 87/09/11 07:20:32 toddb Exp $ */
        !            25: #include "X.h"
        !            26: #include "Xprotostr.h"
        !            27: #include "miscstruct.h"
        !            28: #include "gcstruct.h"
        !            29: #include "pixmap.h"
        !            30: 
        !            31: void
        !            32: miPolyRectangle(pDraw, pGC, nrects, pRects)
        !            33:     DrawablePtr        pDraw;
        !            34:     GCPtr      pGC;
        !            35:     int                nrects;
        !            36:     xRectangle *pRects;
        !            37: {
        !            38:     int i;
        !            39:     xRectangle *pR = pRects;
        !            40:     DDXPointRec rect[5];
        !            41: 
        !            42:     for (i=0; i<nrects; i++)
        !            43:     {
        !            44:        rect[0].x = pR->x;
        !            45:        rect[0].y = pR->y;
        !            46: 
        !            47:        rect[1].x = pR->x + pR->width;
        !            48:        rect[1].y = rect[0].y;
        !            49: 
        !            50:        rect[2].x = rect[1].x;
        !            51:        rect[2].y = pR->y + pR->height;
        !            52: 
        !            53:        rect[3].x = rect[0].x;
        !            54:        rect[3].y = rect[2].y;
        !            55: 
        !            56:        rect[4].x = rect[0].x;
        !            57:        rect[4].y = rect[1].y;
        !            58: 
        !            59:         (*pGC->Polylines)(pDraw, pGC, CoordModeOrigin, 5, rect);
        !            60:        pR++;
        !            61:     }
        !            62: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.