예제 #1
0
	def make(self, parent, fullscreen):
		left = functions.image_to_drawable(self, self.left)
		right = functions.image_to_drawable(self, self.right)
		
		#left 	= functions.image_to_pixbuf(self, self.left)
		#right 	= functions.image_to_pixbuf(self, self.right)
		
		try:
			bus = dbus.SessionBus()
			shutters = bus.get_object('org.stereo3d.shutters', '/org/stereo3d/shutters')
			self.RefreshControl = controller(parent.stereo, shutters, left, right, int(self.conf['rate']))
		except:
			print "Can't connect to the daemon !" # GTK POP-UP ?
		else:
			self.RefreshControl.start()
예제 #2
0
	def make(self, parent, fullscreen):

		
		if self.conf['type'][0] == 'h':
			width 		= self.width + math.fabs(self.vergence)
			height 		= self.height + math.fabs(self.vsep)*2
			self.stereo = Image.new('RGB', (width,height)) # Final image
			self.make_horizontal()
		else:
			width 		= self.width + math.fabs(self.vergence)*2
			height 		= self.height + math.fabs(self.vsep)
			self.stereo = Image.new('RGB', (width,height)) # Final image
			self.make_vertical()
		
		#pixbuf = functions.image_to_pixbuf(self, self.stereo)
		drawable = functions.image_to_drawable(self, self.stereo)
		
		if fullscreen == 0:
			#parent.stereo.set_from_pixbuf(pixbuf) # Display in normal window
			parent.stereo.window.clear()
			x = (parent.max_width - width) / 2
			y = (parent.max_height - height) / 2
			
			if self.conf['type'][0] == 'h' and x%2 == 0:
				x += 1
			if self.conf['type'][0] == 'v' and y%2 == 0:
				y += 1
			
			parent.stereo.window.draw_drawable(parent.gc, drawable, 0, 0, x, y, -1, -1)
		else:
			parent.fs_image.set_from_pixbuf(pixbuf) # Display in fullscreen window
예제 #3
0
	def make(self, parent, fullscreen):
		width 		= self.width + math.fabs(self.vergence)
		height 		= self.height + math.fabs(self.vsep)
		self.stereo = Image.new('RGB', (width,height)) # Final image
		
		self.make_colored()

		drawable = functions.image_to_drawable(self, self.stereo)
		
		x = (parent.max_width - width) / 2
		y = (parent.max_height - height) / 2
		parent.stereo.window.draw_drawable(parent.gc, drawable, 0, 0, x, y, -1, -1)
예제 #4
0
	def make(self, parent, fullscreen):
		self.stereo = self.left
		#pixbuf = functions.image_to_pixbuf(self, self.stereo)
		drawable = functions.image_to_drawable(self, self.stereo)
		
		if fullscreen == 0:
			#parent.stereo.set_from_pixbuf(pixbuf) # Display in normal window
			parent.stereo.window.clear()
			x = (parent.max_width - self.width) / 2
			y = (parent.max_height - self.height) / 2
			parent.stereo.window.draw_drawable(parent.gc, drawable, 0, 0, x, y, -1, -1)
		else:
			parent.fs_image.set_from_pixbuf(pixbuf) # Display in fullscreen window