Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def on_draw(self, ev):
gloo.clear(color='black')
gloo.set_viewport(0, 0, *self.size)
self.draw_visual(self.rpolygon)
def on_draw(self, event):
gloo.clear()
self.program.draw('points')
def on_draw(self, event):
"""Draw the visual."""
gloo.clear(color=True, depth=True)
if self._show_mean:
self.mean.draw()
else:
self.visual.draw()
def on_draw(self, event):
# Update on June 15th, 2018:
# According to a VisPy developer, they have not finished
# porting VisPy to PyQt5. Once they finished the development
# we should try it out if it gives us the maximum refresh rate.
# See the following URL to check the latest information:
#
# https://github.com/vispy/vispy/issues/1394
# Clear the canvas in gray.
gloo.clear(color=self._background_color)
drew = False
try:
if not self._pause_drawing:
# Fetch a buffer.
buffer = self.ia.fetch_buffer(timeout=0.0001)
# Prepare a texture to draw:
self._prepare_texture(buffer)
# Draw the texture until the buffer object exists
# within this scope:
# (We keep the buffer until the next one is delivered to
# keep the current chunk data alive but it depends on the
# application; we just want to tell you that the texture
# must be overdrawn until the content is alive:)
def on_draw(self, event):
gloo.clear(color=True)
def on_draw(self, event):
# Clear the canvas in gray.
gloo.clear(color=self._background_color)
self._update_texture()
def on_draw(e):
gloo.clear('white')
segments.draw()
def on_draw(self, event):
# Clear
gloo.clear(color=True, depth=True)
# Draw
self.program.draw('triangles')
def on_draw(self, event):
gloo.set_clear_color('white')
gloo.clear(color=True)
self.program.draw('triangle_strip')