예제 #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)
예제 #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)
예제 #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)