Beispiel #1
0
	def gabor(self, x, y, *arglist, **kwdict):

		"""Mimicks canvas api. See openexp._canvas.canvas."""

		from openexp.canvas import gabor_file
		image = gabor_file(*arglist, **kwdict)
		return self.image(image, x=x, y=y, scale=1)
	def gabor(self, x, y, *arglist, **kwdict):

		"""Mimicks canvas api. See openexp._canvas.canvas."""

		from openexp.canvas import gabor_file
		try:
			image = gabor_file(*arglist, **kwdict)
		except:
			self.notify(
				_(u'Some properties of a Gabor patch are unknown or variably defined, using fallback image'))
			image = self.sketchpad.theme.qpixmap(u'os-image-fallback')
		return self.image(image, x=x, y=y, scale=1)
    def gabor(self, x, y, *arglist, **kwdict):
        """Mimicks canvas api. See openexp._canvas.canvas."""

        from openexp.canvas import gabor_file
        try:
            image = gabor_file(*arglist, **kwdict)
        except:
            self.notify(
                _(u'Some properties of a Gabor patch are unknown or variably defined, using fallback image'
                  ))
            image = self.sketchpad.theme.qpixmap(u'dialog-question')
        return self.image(image, x=x, y=y, scale=1)