diff options
author | Nostalghia <b.vehikel@googlemail.com> | 2010-05-22 13:52:30 (GMT) |
---|---|---|
committer | Nostalghia <b.vehikel@googlemail.com> | 2010-05-22 13:52:30 (GMT) |
commit | e24ca571a8dccf66740d66e50b47862b5e28adc9 (patch) | |
tree | c65719efcd250439c45c96537f4e49654c51d145 /ep_modifier_mask.py | |
parent | 8394595622cbeb9894da9e83fd3dadacd6266cf6 (diff) |
Bug fixing the mask modifier and border modifier in the rendering engine.
This is not backward compatible.
Diffstat (limited to 'ep_modifier_mask.py')
-rw-r--r-- | ep_modifier_mask.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/ep_modifier_mask.py b/ep_modifier_mask.py index 732a5a7..75db6e4 100644 --- a/ep_modifier_mask.py +++ b/ep_modifier_mask.py @@ -106,23 +106,28 @@ class MaskModifier(model_allele.Allele): pre: height > 0 pre: width == height """ - # paint one layer masked by an linear gradient + # paint masked by an linear gradient ctx.save() + ka_debug.matrix_s(ctx.get_matrix()) delta_x = self.direction.offset * math.cos(self.direction.radian) delta_y = self.direction.offset * math.sin(self.direction.radian) - linear = cairo.LinearGradient(self.center.x_pos + delta_x, - self.center.y_pos + delta_y, - self.center.x_pos - delta_x, - self.center.y_pos - delta_y) + linear = cairo.LinearGradient(self.center.x_pos + delta_x - 0.5, + self.center.y_pos + delta_y - 0.5, + self.center.x_pos - delta_x - 0.5, + self.center.y_pos - delta_y - 0.5) linear.add_color_stop_rgba(1.0, 1.0, 1.0, 1.0, self.alpha1) linear.add_color_stop_rgba(0.0, 0.0, 0.0, 0.0, self.alpha2) - ctx.mask(linear) +# ctx.mask(linear) ctx.save() + ka_debug.matrix_s(ctx.get_matrix()) single_layer.render(task, ctx, width, height) + ka_debug.matrix_r(ctx.get_matrix()) ctx.restore() + ctx.mask(linear) single_treenode.render(task, ctx, width, height) + ka_debug.matrix_r(ctx.get_matrix()) ctx.restore() def explain(self, task, formater, single_layer, single_treenode): |