Skip to content

Commit

Permalink
Remove macros to simplify the experimental tool
Browse files Browse the repository at this point in the history
  • Loading branch information
maoschanz committed Jan 2, 2021
1 parent 8146923 commit ae49a21
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
34 changes: 0 additions & 34 deletions src/tools/classic_tools/tool_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def __init__(self, window, **kwargs):

self.add_tool_action_enum('experiment_operator', self._operator_label)
self.add_tool_action_enum('experiment_mode', self._selected_mode)
self.add_tool_action_simple('experiment_macro_scie', self._macro_scie)

def get_edition_status(self):
return "You're not supposed to use this tool (development only)."
Expand All @@ -76,39 +75,6 @@ def _set_active_operator(self, *args):

############################################################################

def _macro_scie(self, *args):
cairo_context = self.get_context()
# cairo_context.move_to(50, 50)
# cairo_context.move_to(0, 150) # quel que soit le 1er trait, dynamic2 lui
# mets une largeur délirante XXX ; à voir comment ça marche dans le cas
# réel d'un tracé depuis un path
cairo_context.line_to(50, 50)
cairo_context.line_to(100, 150)
cairo_context.line_to(150, 50)
cairo_context.line_to(250, 250)
cairo_context.line_to(350, 50)
cairo_context.line_to(375, 100) #
cairo_context.line_to(400, 50) # dents moins hautes
cairo_context.line_to(425, 100) #
cairo_context.line_to(450, 50)
cairo_context.line_to(500, 150)
cairo_context.line_to(550, 50)
cairo_context.line_to(570, 100) #
cairo_context.line_to(575, 100) # court palier
cairo_context.line_to(580, 100) #
cairo_context.line_to(600, 150)
cairo_context.line_to(650, 50)
self._path = cairo_context.copy_path()
self._macros_common()

def _macros_common(self):
self.set_common_values(1, 1, 1)
operation = self.build_operation()
operation['is_preview'] = False
self.apply_operation(operation)

############################################################################

def on_press_on_area(self, event, surface, event_x, event_y):
self._set_active_operator()
self._set_active_mode()
Expand Down
8 changes: 0 additions & 8 deletions src/tools/ui/tool-experiment.ui
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@
</item>
</section>

<section>
<attribute name="label">Actions</attribute>
<item>
<attribute name="label">Tracé en dents de scies</attribute>
<attribute name="action">win.experiment_macro_scie</attribute>
</item>
</section>

<section>
<attribute name="label">Opérateurs de dessin</attribute>
<submenu>
Expand Down

0 comments on commit ae49a21

Please sign in to comment.