remove the optional gpc component from antigrain, which is licensed under a retarded homemade non-commercial license
This commit is contained in:
parent
2288f5fdf4
commit
078ac3bea0
|
@ -872,10 +872,6 @@
|
||||||
RelativePath=".\src\platform\win32\agg_win32_bmp.cpp"
|
RelativePath=".\src\platform\win32\agg_win32_bmp.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\gpc\gpc.c"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
|
|
|
@ -1,123 +0,0 @@
|
||||||
|
|
||||||
Generic Polygon Clipper (gpc) Revision History
|
|
||||||
==============================================
|
|
||||||
|
|
||||||
|
|
||||||
v2.32 17th Dec 2004
|
|
||||||
---------------------
|
|
||||||
Fixed occasional memory leak occurring when processing some
|
|
||||||
degenerate polygon arrangements.
|
|
||||||
Added explicit type casting to memory allocator in support of
|
|
||||||
increased code portability.
|
|
||||||
|
|
||||||
v2.31 4th Jun 1999
|
|
||||||
---------------------
|
|
||||||
Separated edge merging measure based on a user-defined GPC_EPSILON
|
|
||||||
value from general numeric equality testing and ordering, which now
|
|
||||||
uses direct arithmetic comparison rather an EPSILON based proximity
|
|
||||||
test.
|
|
||||||
Fixed problem with numerical equality test during construction of
|
|
||||||
local minima and scanbeam tables, leading to occasional crash.
|
|
||||||
Fixed hole array memory leak in gpc_add_contour.
|
|
||||||
Fixed uninitialised hole field bug in gpc_polygon_clip result.
|
|
||||||
|
|
||||||
v2.30 11th Apr 1999
|
|
||||||
---------------------
|
|
||||||
Major re-write.
|
|
||||||
Minor API change: additional 'hole' array field added to gpc_polygon
|
|
||||||
datatype to indicate which constituent contours are internal holes,
|
|
||||||
and which form external boundaries.
|
|
||||||
Minor API change: additional 'hole' argument to gpc_add_contour
|
|
||||||
to indicate whether the new contour is a hole or external contour.
|
|
||||||
Minor API change: additional parameter to gpc_read_polygon and
|
|
||||||
gpc_write_polygon to indicate whether or not to read or write
|
|
||||||
contour hole flags.
|
|
||||||
Fixed NULL pointer bug in add/merge left/right operations.
|
|
||||||
Fixed numerical problem in intersection table generation.
|
|
||||||
Fixed zero byte malloc problem.
|
|
||||||
Fixed problem producing occasional 2 vertex contours.
|
|
||||||
Added bounding box test optimisations.
|
|
||||||
Simplified edge bundle creation, detection of scanbeam internal
|
|
||||||
edge intersections and tristrip scanbeam boundary code.
|
|
||||||
Renamed 'class' variable to be C++ friendly.
|
|
||||||
|
|
||||||
v2.22 17th Oct 1998
|
|
||||||
---------------------
|
|
||||||
Re-implemented edge interpolation and intersection calculations
|
|
||||||
to improve numerical robustness.
|
|
||||||
Simplified setting of GPC_EPSILON.
|
|
||||||
|
|
||||||
v2.21 19th Aug 1998
|
|
||||||
---------------------
|
|
||||||
Fixed problem causing occasional incorrect output when processing
|
|
||||||
self-intersecting polygons (bow-ties etc).
|
|
||||||
Removed bug which may lead to non-generation of uppermost triangle
|
|
||||||
in tristrip output.
|
|
||||||
|
|
||||||
v2.20 26th May 1998
|
|
||||||
---------------------
|
|
||||||
Major re-write.
|
|
||||||
Added exclusive-or polygon set operation.
|
|
||||||
Replaced table-based processing of edge intersections with
|
|
||||||
rule-based system.
|
|
||||||
Replaced two-pass approach to scanbeam interior processing with
|
|
||||||
single pass method.
|
|
||||||
|
|
||||||
v2.10a 14th May 1998
|
|
||||||
---------------------
|
|
||||||
Minor bug-fixes to counter some v2.10 reliability problems.
|
|
||||||
|
|
||||||
v2.10 11th May 1998
|
|
||||||
---------------------
|
|
||||||
Major re-write.
|
|
||||||
Incorporated edge bundle processing of AET to overcome coincident
|
|
||||||
edge problems present in previous releases.
|
|
||||||
Replaced Vatti's method for processing scanbeam interior regions
|
|
||||||
with an adapted version of the scanbeam boundary processing
|
|
||||||
algorithm.
|
|
||||||
|
|
||||||
v2.02 16th Apr 1998 (unreleased)
|
|
||||||
----------------------------------
|
|
||||||
Fixed internal minimum vertex duplication in gpc_polygon_clip
|
|
||||||
result.
|
|
||||||
Improved line intersection code discourage superfluous
|
|
||||||
intersections near line ends.
|
|
||||||
Removed limited precision number formatting in gpc_write_polygon.
|
|
||||||
Modification to allow subject or clip polygon to be reused as the
|
|
||||||
result in gpc_polygon_clip without memory leakage.
|
|
||||||
|
|
||||||
v2.01 23rd Feb 1998
|
|
||||||
---------------------
|
|
||||||
Removed bug causing duplicated vertices in output polygon.
|
|
||||||
Fixed scanbeam table index overrun problem.
|
|
||||||
|
|
||||||
v2.00 25th Nov 1997
|
|
||||||
---------------------
|
|
||||||
Major re-write.
|
|
||||||
Replaced temporary horizontal edge work-around (using tilting)
|
|
||||||
with true horizontal edge handling.
|
|
||||||
Trapezoidal output replaced by tristrips.
|
|
||||||
gpc_op constants now feature a `GPC_' prefix.
|
|
||||||
Data structures now passed by reference to gpc functions.
|
|
||||||
Replaced AET search by proxy addressing in polygon table.
|
|
||||||
Eliminated most (all?) coincident vertex / edge crashes.
|
|
||||||
|
|
||||||
v1.02 18th Oct 1997 (unreleased)
|
|
||||||
----------------------------------
|
|
||||||
Significantly reduced number of mallocs in build_lmt.
|
|
||||||
Scanbeam table now built using heapsort rather than insertion
|
|
||||||
sort.
|
|
||||||
|
|
||||||
v1.01 12th Oct 1997
|
|
||||||
---------------------
|
|
||||||
Fixed memory leak during output polygon build in
|
|
||||||
gpc_clip_polygon.
|
|
||||||
Removed superfluous logfile debug code.
|
|
||||||
Commented out malloc counts.
|
|
||||||
Added missing horizontal edge tilt-correction code in
|
|
||||||
gpc_clip_polygon.
|
|
||||||
|
|
||||||
v1.00 8th Oct 1997
|
|
||||||
--------------------
|
|
||||||
First release.
|
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
|
|
||||||
http://www.cs.man.ac.uk/aig/staff/alan/software/
|
|
||||||
|
|
||||||
Author: Alan Murta (email: gpc@cs.man.ac.uk)
|
|
||||||
Version: 2.31
|
|
||||||
Date: 4th June 1999
|
|
||||||
|
|
||||||
Copyright: (C) 1997-1999, Advanced Interfaces Group,
|
|
||||||
University of Manchester.
|
|
||||||
|
|
||||||
This software is free for non-commercial use. It may be copied,
|
|
||||||
modified, and redistributed provided that this copyright notice
|
|
||||||
is preserved on all copies. The intellectual property rights of
|
|
||||||
the algorithms used reside with the University of Manchester
|
|
||||||
Advanced Interfaces Group.
|
|
||||||
|
|
||||||
You may not use this software, in whole or in part, in support
|
|
||||||
of any commercial product without the express consent of the
|
|
||||||
author.
|
|
||||||
|
|
||||||
There is no warranty or other guarantee of fitness of this
|
|
||||||
software for any purpose. It is provided solely "as is".
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,133 +0,0 @@
|
||||||
/*
|
|
||||||
===========================================================================
|
|
||||||
|
|
||||||
Project: Generic Polygon Clipper
|
|
||||||
|
|
||||||
A new algorithm for calculating the difference, intersection,
|
|
||||||
exclusive-or or union of arbitrary polygon sets.
|
|
||||||
|
|
||||||
File: gpc.h
|
|
||||||
Author: Alan Murta (email: gpc@cs.man.ac.uk)
|
|
||||||
Version: 2.32
|
|
||||||
Date: 17th December 2004
|
|
||||||
|
|
||||||
Copyright: (C) 1997-2004, Advanced Interfaces Group,
|
|
||||||
University of Manchester.
|
|
||||||
|
|
||||||
This software is free for non-commercial use. It may be copied,
|
|
||||||
modified, and redistributed provided that this copyright notice
|
|
||||||
is preserved on all copies. The intellectual property rights of
|
|
||||||
the algorithms used reside with the University of Manchester
|
|
||||||
Advanced Interfaces Group.
|
|
||||||
|
|
||||||
You may not use this software, in whole or in part, in support
|
|
||||||
of any commercial product without the express consent of the
|
|
||||||
author.
|
|
||||||
|
|
||||||
There is no warranty or other guarantee of fitness of this
|
|
||||||
software for any purpose. It is provided solely "as is".
|
|
||||||
|
|
||||||
===========================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __gpc_h
|
|
||||||
#define __gpc_h
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
===========================================================================
|
|
||||||
Constants
|
|
||||||
===========================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Increase GPC_EPSILON to encourage merging of near coincident edges */
|
|
||||||
|
|
||||||
#define GPC_EPSILON (DBL_EPSILON)
|
|
||||||
|
|
||||||
#define GPC_VERSION "2.32"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
===========================================================================
|
|
||||||
Public Data Types
|
|
||||||
===========================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef enum /* Set operation type */
|
|
||||||
{
|
|
||||||
GPC_DIFF, /* Difference */
|
|
||||||
GPC_INT, /* Intersection */
|
|
||||||
GPC_XOR, /* Exclusive or */
|
|
||||||
GPC_UNION /* Union */
|
|
||||||
} gpc_op;
|
|
||||||
|
|
||||||
typedef struct /* Polygon vertex structure */
|
|
||||||
{
|
|
||||||
double x; /* Vertex x component */
|
|
||||||
double y; /* vertex y component */
|
|
||||||
} gpc_vertex;
|
|
||||||
|
|
||||||
typedef struct /* Vertex list structure */
|
|
||||||
{
|
|
||||||
int num_vertices; /* Number of vertices in list */
|
|
||||||
gpc_vertex *vertex; /* Vertex array pointer */
|
|
||||||
} gpc_vertex_list;
|
|
||||||
|
|
||||||
typedef struct /* Polygon set structure */
|
|
||||||
{
|
|
||||||
int num_contours; /* Number of contours in polygon */
|
|
||||||
int *hole; /* Hole / external contour flags */
|
|
||||||
gpc_vertex_list *contour; /* Contour array pointer */
|
|
||||||
} gpc_polygon;
|
|
||||||
|
|
||||||
typedef struct /* Tristrip set structure */
|
|
||||||
{
|
|
||||||
int num_strips; /* Number of tristrips */
|
|
||||||
gpc_vertex_list *strip; /* Tristrip array pointer */
|
|
||||||
} gpc_tristrip;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
===========================================================================
|
|
||||||
Public Function Prototypes
|
|
||||||
===========================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
void gpc_read_polygon (FILE *infile_ptr,
|
|
||||||
int read_hole_flags,
|
|
||||||
gpc_polygon *polygon);
|
|
||||||
|
|
||||||
void gpc_write_polygon (FILE *outfile_ptr,
|
|
||||||
int write_hole_flags,
|
|
||||||
gpc_polygon *polygon);
|
|
||||||
|
|
||||||
void gpc_add_contour (gpc_polygon *polygon,
|
|
||||||
gpc_vertex_list *contour,
|
|
||||||
int hole);
|
|
||||||
|
|
||||||
void gpc_polygon_clip (gpc_op set_operation,
|
|
||||||
gpc_polygon *subject_polygon,
|
|
||||||
gpc_polygon *clip_polygon,
|
|
||||||
gpc_polygon *result_polygon);
|
|
||||||
|
|
||||||
void gpc_tristrip_clip (gpc_op set_operation,
|
|
||||||
gpc_polygon *subject_polygon,
|
|
||||||
gpc_polygon *clip_polygon,
|
|
||||||
gpc_tristrip *result_tristrip);
|
|
||||||
|
|
||||||
void gpc_polygon_to_tristrip (gpc_polygon *polygon,
|
|
||||||
gpc_tristrip *tristrip);
|
|
||||||
|
|
||||||
void gpc_free_polygon (gpc_polygon *polygon);
|
|
||||||
|
|
||||||
void gpc_free_tristrip (gpc_tristrip *tristrip);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
===========================================================================
|
|
||||||
End of file: gpc.h
|
|
||||||
===========================================================================
|
|
||||||
*/
|
|
Loading…
Reference in New Issue