From 20228603edd4759e465dd02fc358e09833c3a80f Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 16 Apr 1999 00:00:42 +0000 Subject: [PATCH] Changes to support new gpc api with hole tracking support. --- Tools/Construct/Clipper/clipper.cxx | 12 ++++++------ Tools/Prep/ShapeFile/shape.cxx | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Tools/Construct/Clipper/clipper.cxx b/Tools/Construct/Clipper/clipper.cxx index fafbd6ef8..501abcdf1 100644 --- a/Tools/Construct/Clipper/clipper.cxx +++ b/Tools/Construct/Clipper/clipper.cxx @@ -119,7 +119,7 @@ bool FGClipper::load_polys(const string& path) { << lastx << ", " << lasty ); } - gpc_add_contour( poly, &v_list ); + gpc_add_contour( poly, &v_list, 0 ); } @@ -172,7 +172,7 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) { polys_in.safety_base.num_contours = 0; polys_in.safety_base.contour = NULL; - gpc_add_contour( &polys_in.safety_base, &v_list ); + gpc_add_contour( &polys_in.safety_base, &v_list, 0 ); // process polygons in priority order for ( int i = 0; i < FG_MAX_AREA_TYPES; ++i ) { @@ -206,11 +206,11 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) { // << endl; // tmp output accum FILE *ofp= fopen("tmp-debug", "w"); - gpc_write_polygon(ofp, &tmp); + gpc_write_polygon(ofp, 1, &tmp); fclose(ofp); ofp= fopen("accum-debug", "w"); - gpc_write_polygon(ofp, &accum); + gpc_write_polygon(ofp, 1, &accum); fclose(ofp); gpc_polygon_clip(GPC_DIFF, &tmp, &accum, result_diff); @@ -259,12 +259,12 @@ bool FGClipper::clip_all(const point2d& min, const point2d& max) { // tmp output accum FILE *ofp= fopen("accum", "w"); - gpc_write_polygon(ofp, &accum); + gpc_write_polygon(ofp, 1, &accum); fclose(ofp); // tmp output safety_base ofp= fopen("remains", "w"); - gpc_write_polygon(ofp, remains); + gpc_write_polygon(ofp, 1, remains); fclose(ofp); return true; diff --git a/Tools/Prep/ShapeFile/shape.cxx b/Tools/Prep/ShapeFile/shape.cxx index 90a3fadfe..f3786d6eb 100644 --- a/Tools/Prep/ShapeFile/shape.cxx +++ b/Tools/Prep/ShapeFile/shape.cxx @@ -93,7 +93,7 @@ static void clip_and_write_poly( string root, long int p_index, AreaType area, base.num_contours = 0; base.contour = NULL; - gpc_add_contour( &base, &v_list ); + gpc_add_contour( &base, &v_list, 0 ); // FG_LOG( FG_GENERAL, FG_DEBUG, "base = 4 vertices" ); @@ -126,7 +126,7 @@ static void clip_and_write_poly( string root, long int p_index, AreaType area, FILE *rfp= fopen( polyfile.c_str(), "w" ); fprintf( rfp, "%s\n", poly_type.c_str() ); - gpc_write_polygon( rfp, &result ); + gpc_write_polygon( rfp, 1, &result ); fclose( rfp ); } @@ -160,7 +160,7 @@ void add_to_shape(int count, double *coords, gpc_polygon *shape) { } v_list.num_vertices = count; - gpc_add_contour( shape, &v_list ); + gpc_add_contour( shape, &v_list, 0 ); }