Logo Search packages:      
Sourcecode: eikazo version File versions  Download package

def Eikazo::Preview::_SanePreview::__init__ (   self,
  device,
  size = (300,300,
  data = None 
)

device: a Widgets.SaneDevice instance
    size:   initial widget size
    data:   (img, scanwindow), optional PIL Image object and scan
    window coordinates for inital display

Definition at line 232 of file Preview.py.

00232                                                          :
        """ device: a Widgets.SaneDevice instance
            size:   initial widget size
            data:   (img, scanwindow), optional PIL Image object and scan
                    window coordinates for inital display
        """
        gtk.DrawingArea.__init__(self)
        self.set_size_request(*size)
        self.limitDisplay = False

        self.add_events(gtk.gdk.POINTER_MOTION_MASK |
                        gtk.gdk.BUTTON_PRESS_MASK |
                        gtk.gdk.BUTTON_RELEASE_MASK)
        self.connect("expose-event", self.expose)
        
        self.device = device
        self.map = None
        
        if data:
            self.setImage(*data)
        else:
            im = Image.new('L', (500,500))
            self.setInitImage(im)
        
        self.connect("motion_notify_event", self.motion_notify)
        self.connect("button-press-event", self.button_pressed)
        self.connect("button-release-event", self.button_released)
        
        self.buttons = 0
        self.imagescale = -1
        
        self.device.connect("sane-geometry", self.geometryUpdate)
    
    def geometryUpdate(self, device):


Generated by  Doxygen 1.6.0   Back to index