Annotation of researchv9/X11/src/X.V11R1/server/ddx/mi/mifpoly.h, revision 1.1

1.1     ! root        1: /* $Header: mifpoly.h,v 1.1 87/09/11 07:20:47 toddb Exp $ */
        !             2: /***********************************************************
        !             3: Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
        !             4: and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
        !             5: 
        !             6:                         All Rights Reserved
        !             7: 
        !             8: Permission to use, copy, modify, and distribute this software and its 
        !             9: documentation for any purpose and without fee is hereby granted, 
        !            10: provided that the above copyright notice appear in all copies and that
        !            11: both that copyright notice and this permission notice appear in 
        !            12: supporting documentation, and that the names of Digital or MIT not be
        !            13: used in advertising or publicity pertaining to distribution of the
        !            14: software without specific, written prior permission.  
        !            15: 
        !            16: DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
        !            17: ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
        !            18: DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
        !            19: ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
        !            20: WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
        !            21: ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
        !            22: SOFTWARE.
        !            23: 
        !            24: ******************************************************************/
        !            25: 
        !            26: #define EPSILON        0.000001
        !            27: #define ISEQUAL(a, b) (fabs((a) - (b)) <= EPSILON)
        !            28: #define WITHINHALF(a, b) (((a) - (b) > 0.0) ? (a) - (b) < 0.5 : \
        !            29:                                             (b) - (a) <= 0.5)
        !            30: #define ROUNDTOINT(x)   ((int) (((x) > 0.0) ? ((x) + 0.5) : ((x) - 0.5)))
        !            31: #define ISZERO(x)      (fabs((x)) <= EPSILON)
        !            32: #define PtEqual(a, b) (((a).x == (b).x) && ((a).y == (b).y))
        !            33: 
        !            34: #define NotEnd         0
        !            35: #define FirstEnd       1
        !            36: #define SecondEnd      2
        !            37: 
        !            38: /* Point with sub-pixel positioning.  In this case we use doubles, but
        !            39:  * see mifpolycon.c for other suggestions 
        !            40:  */
        !            41: typedef struct _SppPoint {
        !            42:        double  x, y;
        !            43: } SppPointRec, *SppPointPtr;
        !            44: 
        !            45: extern SppPointRec miExtendSegment();

unix.superglobalmegacorp.com

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