def ceil(f): return int(fceil(f))
from __future__ import absolute_import import cairo from gi.repository import Gtk from math import ceil as fceil ceil = lambda f: int(fceil(f)) from .__init__ import NORTH, EAST, SOUTH, WEST, CENTER from .OverlayWindow import OverlayWindow class HighlightArea (OverlayWindow): """ An entirely blue widget """ def __init__ (self, parent): OverlayWindow.__init__(self, parent) self.myparent = parent self.connect_after("draw", self.__onExpose) def showAt (self, position): alloc = self.myparent.get_allocation() if position == NORTH: x, y = 0, 0 width, height = alloc.width, alloc.height*0.381966011 elif position == EAST: x, y = alloc.width*0.618033989, 0 width, height = alloc.width*0.381966011, alloc.height elif position == SOUTH: x, y = 0, alloc.height*0.618033989 width, height = alloc.width, alloc.height*0.381966011 elif position == WEST:
def ceil(f): return int(fceil(f))
import gtk, cairo from math import ceil as fceil ceil = lambda f: int(fceil(f)) from __init__ import NORTH, EAST, SOUTH, WEST, CENTER from OverlayWindow import OverlayWindow class HighlightArea (OverlayWindow): """ An entirely blue widget """ def __init__ (self, parent): OverlayWindow.__init__(self, parent) self.myparent = parent self.connect_after("expose-event", self.__onExpose) def showAt (self, position): alloc = self.myparent.get_allocation() if position == NORTH: x, y = 0, 0 width, height = alloc.width, alloc.height*0.381966011 elif position == EAST: x, y = alloc.width*0.618033989, 0 width, height = alloc.width*0.381966011, alloc.height elif position == SOUTH: x, y = 0, alloc.height*0.618033989 width, height = alloc.width, alloc.height*0.381966011 elif position == WEST: x, y = 0, 0 width, height = alloc.width*0.381966011, alloc.height elif position == CENTER: