41int main(
int argc,
char **argv)
44 std::cout <<
"boolops: wrong number of arguments; no tests run!" << std::endl;
50 unsigned const ops = atoi(argv[1]);
55 std::cout << argv[1] <<
" contains an empty path" << std::endl;
59 std::cout << argv[2] <<
" contains an empty path" << std::endl;
66 long num_intersections = 0;
70 g_random_set_seed(1234);
72 for (
unsigned i = 0; i < ops; ++i) {
74 delta[
X] = g_random_double_range(-bbox->width(), abox->width());
75 delta[
Y] = g_random_double_range(-bbox->height(), abox->height());
85 std::cout <<
"Completed " << ops <<
" operations.\n"
86 <<
"Total intersections: " << num_intersections <<
"\n"
87 <<
"Total output curves: " << num_outcv << std::endl;
Axis-aligned rectangle that can be empty.
Intermediate data for computing Boolean operations on paths.
PathVector getIntersection()
Get the intersection of the shapes, A ∩ B.
std::vector< Point > intersectionPoints(bool defective=false) const
Get the geometric points where the two path-vectors intersect.
OptRect boundsExact() const
size_type curveCount() const
Get the total number of curves in the vector.
Two-dimensional point that doubles as a vector.
PathVector read_svgd(char const *filename)
Create path vector from SVG path data stored in a file.
Various utility functions.
parse SVG path specifications