diff options
author | Thomas Jourdan <b.vehikel@googlemail.com> | 2010-02-22 21:08:31 (GMT) |
---|---|---|
committer | Thomas Jourdan <b.vehikel@googlemail.com> | 2010-02-22 21:08:31 (GMT) |
commit | 267e69b6ca86aa040921f04a0fecdc1f2de52148 (patch) | |
tree | c0922f1623178eedbcf947aabd62464035cf38cb /ep_layer_filledspline.py | |
parent | e899cc8750b1368eb57d91ca7ded96cb88b1de19 (diff) |
Bug fixing samplers / rendering engine. The changes in the rendering are not backwards compatible.
Diffstat (limited to 'ep_layer_filledspline.py')
-rw-r--r-- | ep_layer_filledspline.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/ep_layer_filledspline.py b/ep_layer_filledspline.py index 06ccd9f..fb7dc11 100644 --- a/ep_layer_filledspline.py +++ b/ep_layer_filledspline.py @@ -168,22 +168,15 @@ class FilledSpline(model_layer.Layer): px, py = self.center.x_pos, self.center.y_pos ctx.move_to(px, py) points = self.sampler.get_sample_points() -# position_list = [] -# for step in self.direction_steps: -# px += step.offset * math.cos(step.radian) -# py += step.offset * math.sin(step.radian) -# position_list.append((px, py, step.radian)) for index, step_0 in enumerate(points): if index < 2: -# ctx.line_to(step_0[0], step_0[1]) ctx.move_to(px, py) elif index == len(points)-1: -# ctx.line_to(step_0[0], step_0[1]) ctx.move_to(px, py) else: - step_p1 = points[index+1] - step_m1 = points[index-1] - step_m2 = points[index-2] + step_p1 = (px+points[index+1][0], py+points[index+1][1]) + step_m1 = (px+points[index-1][0], py+points[index-1][1]) + step_m2 = (px+points[index-2][0], py+points[index-2][1]) sp_delta_x = self.roundness * (step_m1[0] - step_m2[0]) sp_delta_y = self.roundness * (step_m1[1] - step_m2[1]) ap_delta_x = step_0[0] - step_m1[0] |