]> Pileus Git - ~andy/gtk/blob - gdk/linux-fb/mipoly.c
Fixes #136082 and #135265, patch by Morten Welinder.
[~andy/gtk] / gdk / linux-fb / mipoly.c
1 /***********************************************************
2
3 Copyright 1987, 1998  The Open Group
4
5 All Rights Reserved.
6
7 The above copyright notice and this permission notice shall be included in
8 all copies or substantial portions of the Software.
9
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
13 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
14 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
15 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
17 Except as contained in this notice, the name of The Open Group shall not be
18 used in advertising or otherwise to promote the sale, use or other dealings
19 in this Software without prior written authorization from The Open Group.
20
21
22 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
23
24                         All Rights Reserved
25
26 Permission to use, copy, modify, and distribute this software and its 
27 documentation for any purpose and without fee is hereby granted, 
28 provided that the above copyright notice appear in all copies and that
29 both that copyright notice and this permission notice appear in 
30 supporting documentation, and that the name of Digital not be
31 used in advertising or publicity pertaining to distribution of the
32 software without specific, written prior permission.  
33
34 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
35 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
36 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
37 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
38 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
39 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
40 SOFTWARE.
41
42 ******************************************************************/
43 /* $TOG: mipoly.c /main/5 1998/02/09 14:48:16 kaleb $ */
44 /*
45  *  mipoly.c
46  *
47  *  Written by Brian Kelleher; June 1986
48  *
49  *  Draw polygons.  This routine translates the point by the
50  *  origin if pGC->miTranslate is non-zero, and calls
51  *  to the appropriate routine to actually scan convert the
52  *  polygon.
53  */
54 #include <config.h>
55 #include "mi.h"
56
57 extern gboolean miFillGeneralPoly(
58 #if NeedFunctionPrototypes
59     GdkDrawable* /*dst*/,
60     GdkGC* /*pgc*/,
61     int /*count*/,
62     GdkPoint* /*ptsIn*/
63 #endif
64 );
65
66 void
67 miFillPolygon(dst, pgc, shape, mode, count, pPts)
68     GdkDrawable*                dst;
69     register GdkGC*     pgc;
70     int                 shape, mode;
71     register int        count;
72     GdkPoint*           pPts;
73 {
74     if (count == 0)
75         return;
76
77     miFillGeneralPoly(dst, pgc, count, pPts);
78 }