- self.draw_polygon(verts, [0, 0, 0])
+ self.draw_polygon_by_verts(verts, None, [0, 0, 0])
for i, v in enumerate(verts[:]):
radial_orientation_angle = (i + 1) * central_angle
for i, v in enumerate(verts[:]):
radial_orientation_angle = (i + 1) * central_angle
if model.show_labels:
ta = self.normalized_angle_01(rotated_radial_orientation_angle)
text = ("%.2f" % (ta * 360)).rstrip('0').rstrip('.')
if model.show_labels:
ta = self.normalized_angle_01(rotated_radial_orientation_angle)
text = ("%.2f" % (ta * 360)).rstrip('0').rstrip('.')
self.draw_centered_text(v[0], v[1], text,
rotated_radial_orientation_angle, color,
align_baseline=True)
def draw_element(self, x, y, model, theta, color=[0, 0, 0]):
if model.show_elements:
self.draw_centered_text(v[0], v[1], text,
rotated_radial_orientation_angle, color,
align_baseline=True)
def draw_element(self, x, y, model, theta, color=[0, 0, 0]):
if model.show_elements:
- tverts = self.get_regular_polygon(x, y, model.element_sides, model.element_radius, theta)
- self.draw_polygon(tverts, color)
+ self.draw_polygon(x, y, model.element_sides, model.element_radius,
+ theta, None, color)
- apothem = model.element_radius * cos(pi / model.element_sides)
- apothem_angle = theta + pi / model.element_sides
-
- sverts = self.get_regular_polygon(x, y, model.element_sides, apothem,
- apothem_angle)
- self.draw_star(x, y, sverts, color)
+ self.draw_star(x, y, model.element_sides, model.element_radius,
+ theta, color)