Ejemplo n.º 1
0
	def noise_patch(self, x, y, *arglist, **kwdict):

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

		from openexp.canvas import noise_file
		image = noise_file(*arglist, **kwdict)
		return self.image(image, x=x, y=y, scale=1)
Ejemplo n.º 2
0
	def noise_patch(self, x, y, *arglist, **kwdict):

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

		from openexp.canvas import noise_file
		try:
			image = noise_file(*arglist, **kwdict)
		except:
			self.notify(
				_(u'Some properties of a noise 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)
Ejemplo n.º 3
0
    def noise_patch(self, x, y, *arglist, **kwdict):
        """Mimicks canvas api. See openexp._canvas.canvas."""

        from openexp.canvas import noise_file
        try:
            image = noise_file(*arglist, **kwdict)
        except:
            self.notify(
                _(u'Some properties of a noise 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)