MCPcopy Create free account
hub / github.com/brain-workshop/brainworkshop / draw

Method draw

brainworkshop.py:3571–3583  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3569 mode.saccadic = False
3570
3571 def draw(self):
3572 y = height_center()
3573 if saccadic.position == 'left':
3574 x = self.radius
3575 elif saccadic.position == 'right':
3576 x = window.width - self.radius
3577 pyglet.graphics.draw(4, pyglet.gl.GL_POLYGON, ('v2i', (
3578 x - self.radius, y - self.radius, # lower-left
3579 x + self.radius, y - self.radius, # lower-right
3580 x + self.radius, y + self.radius, # upper-right
3581 x - self.radius, y + self.radius, # upper-left
3582
3583 )), ('c4B', self.color * 4))
3584
3585# self.square = batch.add(40, pyglet.gl.GL_POLYGON, None,
3586# ('v2i', xy), ('c4B', self.color * 40))

Callers

nothing calls this directly

Calls 2

height_centerFunction · 0.85
drawMethod · 0.45

Tested by

no test coverage detected