Skip to content

Commit

Permalink
Fixed WPF compatibility with TrimStart, TrimEnd and TrimOffset proper…
Browse files Browse the repository at this point in the history
…ties
  • Loading branch information
jesusdesantos committed Aug 11, 2020
1 parent 91437ec commit 067ebca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions json2xaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,19 +973,19 @@ def write_paths(self, obj, paint_, operators):
if trim_start[0].first != 0:
self.noesis_namespace = True
self.body += ' noesis:Path.TrimStart="%s"' % format_float(trim_start[0].first / 100.0)
self.write_float_animation(trim_start[0], "TrimStart", path_name, 1.0 / 100.0)
self.write_float_animation(trim_start[0], "(noesis:Path.TrimStart)", path_name, 1.0 / 100.0)

if trim_end:
if trim_end[0].first != 100:
self.noesis_namespace = True
self.body += ' noesis:Path.TrimEnd="%s"' % format_float(trim_end[0].first / 100.0)
self.write_float_animation(trim_end[0], "TrimEnd", path_name, 1.0 / 100.0)
self.write_float_animation(trim_end[0], "(noesis:Path.TrimEnd)", path_name, 1.0 / 100.0)

if trim_offset:
if trim_offset[0].first != 0:
self.noesis_namespace = True
self.body += ' noesis:Path.TrimOffset="%s"' % format_float(trim_offset[0].first / 360.0)
self.write_float_animation(trim_offset[0], "TrimOffset", path_name, 1.0 / 360.0)
self.write_float_animation(trim_offset[0], "(noesis:Path.TrimOffset)", path_name, 1.0 / 360.0)

if path_animated:
self.body += '>\n'
Expand Down

0 comments on commit 067ebca

Please sign in to comment.