mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-16 16:34:47 -04:00
added runtime errors at append and reverse of bezier polygons
This commit is contained in:
parent
8e0325a17b
commit
0aafead235
@ -166,6 +166,8 @@ public class Polygon implements Iterable<Vector> {
|
||||
* @return this for chained calls
|
||||
*/
|
||||
public Polygon append(Polygon p2) {
|
||||
if (!p2.isBezierStart.isEmpty())
|
||||
throw new RuntimeException("append of bezier not supported");
|
||||
for (int i = 1; i < p2.points.size(); i++)
|
||||
points.add(p2.points.get(i));
|
||||
return this;
|
||||
@ -177,6 +179,8 @@ public class Polygon implements Iterable<Vector> {
|
||||
* @return returns this polygon with reverse order of points
|
||||
*/
|
||||
public Polygon reverse() {
|
||||
if (!isBezierStart.isEmpty())
|
||||
throw new RuntimeException("reverse of bezier not supported");
|
||||
Polygon p = new Polygon(closed);
|
||||
for (int i = points.size() - 1; i >= 0; i--)
|
||||
p.add(points.get(i));
|
||||
|
Loading…
x
Reference in New Issue
Block a user