radius1(1.0),
radius2(0.38),
points(5),
- angle(Angle::deg(90))
+ angle(Angle::deg(90)),
+ regular_polygon(false)
{
sync();
}
Angle dist1(dist_between_points*i+angle);
Angle dist2(dist_between_points*i+dist_between_points/2+angle);
vector_list.push_back(Point(Angle::cos(dist1).get()*radius1,Angle::sin(dist1).get()*radius1));
- vector_list.push_back(Point(Angle::cos(dist2).get()*radius2,Angle::sin(dist2).get()*radius2));
+ if (!regular_polygon)
+ vector_list.push_back(Point(Angle::cos(dist2).get()*radius2,Angle::sin(dist2).get()*radius2));
}
clear();
add_polygon(vector_list);
return true;
}
+ if(param=="regular_polygon" && value.same_type_as(regular_polygon))
+ {
+ value.put(®ular_polygon);
+ sync();
+ return true;
+ }
+
if(param=="vector_list")
return false;
EXPORT(radius2);
EXPORT(points);
EXPORT(angle);
+ EXPORT(regular_polygon);
EXPORT_NAME();
EXPORT_VERSION();
.set_description(_("The number of points in the star"))
);
+ ret.push_back(ParamDesc("regular_polygon")
+ .set_local_name(_("Regular Polygon"))
+ .set_description(_("Whether to draw a star or a regular polygon"))
+ );
+
return ret;
}