]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkpolyreg-generic.c
Updated Belarusian Latin translation.
[~andy/gtk] / gdk / gdkpolyreg-generic.c
index 838701d8cd9bdc5e3f50112d61d33472ee27824f..e759cb8d44e057780ab20954ce8ae43a7082974d 100644 (file)
@@ -46,9 +46,11 @@ SOFTWARE.
 #define LARGE_COORDINATE 1000000
 #define SMALL_COORDINATE -LARGE_COORDINATE
 
+#include <config.h>
 #include <gdkregion.h>
 #include "gdkregion-generic.h"
 #include "gdkpoly-generic.h"
+#include "gdkalias.h"
 
 /*
  *     InsertEdgeInET
@@ -401,9 +403,8 @@ static int PtsToRegion(numFullPtBlocks, iCurPtBlock, FirstPtBlock, reg)
  
     numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1;
  
-    reg->rects = g_renew (GdkRegionBox, reg->rects, numRects);
-    reg->size = numRects;
+    GROWREGION(reg, numRects);
+
     CurPtBlock = FirstPtBlock;
     rects = reg->rects - 1;
     numRects = 0;
@@ -450,12 +451,17 @@ static int PtsToRegion(numFullPtBlocks, iCurPtBlock, FirstPtBlock, reg)
     return(TRUE);
 }
 
-/*
- *     polytoregion
+/**
+ * gdk_region_polygon:
+ * @points: an array of #GdkPoint structs
+ * @npoints: the number of elements in the @points array
+ * @fill_rule: specifies which pixels are included in the region when the 
+ *     polygon overlaps itself.
+ * 
+ * Creates a new #GdkRegion using the polygon defined by a 
+ * number of points.
  *
- *     Scan converts a polygon by returning a run-length
- *     encoding of the resultant bitmap -- the run-length
- *     encoding is in the form of an array of rectangles.
+ * Returns: a new #GdkRegion based on the given polygon
  */
 GdkRegion *
 gdk_region_polygon(GdkPoint *Pts, gint Count, GdkFillRule rule)
@@ -616,3 +622,6 @@ gdk_region_polygon(GdkPoint *Pts, gint Count, GdkFillRule rule)
     g_free (pETEs);
     return(region);
 }
+
+#define __GDK_POLYREG_GENERIC_C__
+#include "gdkaliasdef.c"