include/rays/polygon.h in rays-0.1.14 vs include/rays/polygon.h in rays-0.1.15
- old
+ new
@@ -4,10 +4,11 @@
#define __RAYS_POLYGON_H__
#include <vector>
#include <xot/pimpl.h>
+#include <rays/defs.h>
#include <rays/bounds.h>
#include <rays/polyline.h>
namespace Rays
@@ -59,11 +60,16 @@
Polygon (const Line* lines, size_t size);
~Polygon ();
- bool expand (Polygon* result, coord width) const;
+ bool expand (
+ Polygon* result,
+ coord width,
+ CapType cap = CAP_DEFAULT,
+ JoinType join = JOIN_DEFAULT,
+ coord miter_limit = JOIN_DEFAULT_MITER_LIMIT) const;
Bounds bounds () const;
size_t size () const;
@@ -154,9 +160,37 @@
const Point& center, const Point& radius,
const Point& hole_radius = 0,
float angle_from = 0,
float angle_to = 360,
uint nsegment = 0);
+
+
+ Polygon create_curve (
+ coord x1, coord y1, coord x2, coord y2,
+ coord x3, coord y3, coord x4, coord y4,
+ bool loop = false);
+
+ Polygon create_curve (
+ const Point& p1, const Point& p2, const Point& p3, const Point& p4,
+ bool loop = false);
+
+ Polygon create_curve (
+ const Point* points, size_t size,
+ bool loop = false);
+
+
+ Polygon create_bezier (
+ coord x1, coord y1, coord x2, coord y2,
+ coord x3, coord y3, coord x4, coord y4,
+ bool loop = false);
+
+ Polygon create_bezier (
+ const Point& p1, const Point& p2, const Point& p3, const Point& p4,
+ bool loop = false);
+
+ Polygon create_bezier (
+ const Point* points, size_t size,
+ bool loop = false);
}// Rays