Skip to content
Snippets Groups Projects
Commit 7fe7ee12 authored by Jdrezen's avatar Jdrezen
Browse files

Ajout d'une légende

parent 25288f0f
Branches
No related tags found
No related merge requests found
...@@ -33,6 +33,14 @@ class ControleurPhilosophersExample(Controleur): ...@@ -33,6 +33,14 @@ class ControleurPhilosophersExample(Controleur):
self.setXLabel(self.__barChart[2],'Philosophers') self.setXLabel(self.__barChart[2],'Philosophers')
self.setYLabel(self.__barChart[2],'Hours') self.setYLabel(self.__barChart[2],'Hours')
self.draw_text(40,15, "EATING")
self.draw_text(40,45, "THINKING")
self.draw_text(40,75, "HUNGRY")
self.draw_rectangle(10, 10, 20, 20, 'green')
self.draw_rectangle(10, 40, 20, 20, 'blue')
self.draw_rectangle(10, 70, 20, 20, 'red')
for i in range(self.__numberPhilosopher): for i in range(self.__numberPhilosopher):
x = 100 * cos(2 * pi * i / self.__numberPhilosopher) + (widthCanvas / 2) x = 100 * cos(2 * pi * i / self.__numberPhilosopher) + (widthCanvas / 2)
y = 100 * sin(2 * pi * i / self.__numberPhilosopher) + (heightCanvas / 2) y = 100 * sin(2 * pi * i / self.__numberPhilosopher) + (heightCanvas / 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment