Пример #1
0
	def draw(self):
		global startTime
		motherboard.setPenRadius(.005)
		motherboard.setPenColor(motherboard.DARK_GRAY)
		motherboard.rectangle(self.xpos, self.ypos, self.width, self.height)
		motherboard.rectangle(self.xpos, self.ypos, self.width, self.innerheight)
		#yellow status
		motherboard.setPenColor(motherboard.CUP_YELLOW)
		motherboard.filledCircle(self.xpos, self.ypos + self.height - (self.height - self.innerheight)/2 , 20)
		motherboard.setPenColor(motherboard.DARK_GRAY)

		#red status
		motherboard.setPenColor(motherboard.CUP_RED)
		motherboard.filledCircle(self.xpos - 2*self.width/3, self.ypos + self.height - (self.height - self.innerheight)/2 , 20)
		motherboard.setPenColor(motherboard.DARK_GRAY)

		#green status
		motherboard.setPenColor(motherboard.CUP_GREEN)
		motherboard.filledCircle(self.xpos + 2*self.width/3, self.ypos + self.height - (self.height - self.innerheight)/2 , 20)
		motherboard.setPenColor(motherboard.DARK_GRAY)

		#outlines of circles
		motherboard.setPenRadius(0.004)
		motherboard.circle(self.xpos, self.ypos + self.height - (self.height - self.innerheight)/2 , 21)
		motherboard.circle(self.xpos + 2*self.width/3, self.ypos + self.height - (self.height - self.innerheight)/2 , 21)
		motherboard.circle(self.xpos - 2*self.width/3, self.ypos + self.height - (self.height - self.innerheight)/2 , 21)
Пример #2
0
	def draw(self):
		motherboard.setPenRadius(.002)
		motherboard.setPenColor(self.color)
		motherboard.filledRectangle(self.xpos, self.ypos, self.width, self.height)
		motherboard.setPenColor(motherboard.DARK_GRAY)
		motherboard.setFontFamily("Arial")
		motherboard.setFontSize(20)
		motherboard.text(self.xpos, self.ypos, self.name)
		motherboard.rectangle(self.xpos, self.ypos, self.width, self.height)
Пример #3
0
import motherboard
from order import Order
from table import Table

motherboard.createWindow(1200, 800)
motherboard.setXscale(0, 1200)
motherboard.setYscale(0, 800)

motherboard.setPenRadius(0.005)
motherboard.setPenColor(motherboard.DARK_GRAY)

#frame
motherboard.rectangle(600, 400, 600, 400)
motherboard.rectangle(600, 770, 600, 30)
motherboard.line(600, 740, 600, 800)





#-------------------------------------------------------------------
# Large Rectangle
#
#-------------------------------------------------------------------

#large
largeTable = Table(600, 400, 100, 170, 1)
largeX = 600
largeY = 400
motherboard.rectangle(largeX, largeY, 100, 170)
motherboard.rectangle(largeX, largeY, 100, 120)