def prepare(self): self._stim = Visual(position=self.to_xy(self.x, self.y)) self._stim.set_surface( canvas._noise_patch(self.env, self.size, self.stdev, self.col1, self.col2, self.bgmode)) self._stim.preload()
def prepare(self): self._stim = Visual(position=self.to_xy(self.x, self.y)) self._stim.set_surface( canvas._gabor( self.orient, self.freq, self.env, self.size, self.stdev, self.phase, self.col1, self.col2, self.bgmode ) ) self._stim.preload()
def prepare(self): im = self._to_pil() surface = pygame.image.fromstring(im.tobytes(), im.size, im.mode) x, y = self.to_xy(self.x, self.y) if not self.center: x += im.width // 2 y -= im.height // 2 self._stim = Visual(position=(x, y)) self._stim.set_surface(surface) self._stim.preload()