Beispiel #1
0
    def __init__(self, xPos, yPos, width, height):
        # Convert from points to pixels
        xPos = int(pointsToPixels(xPos))
        yPos = int(pointsToPixels(yPos))
        width = max(int(pointsToPixels(width)), 1)
        height = max(int(pointsToPixels(height)), 1)

        self._impl = _graphics.TransparentWindow(xPos, yPos, width, height)
    def __init__(self, xPos, yPos, width, height):
        # Convert from points to pixels
        xPos = int(pointsToPixels(xPos))
        yPos = int(pointsToPixels(yPos))
        width = max(int(pointsToPixels(width)), 1)
        height = max(int(pointsToPixels(height)), 1)

        self._impl = _graphics.TransparentWindow(xPos, yPos, width, height)
 def setSize(self, width, height):
     # OPTIMIZATION BEGIN:
     # Caching last set size for doing it only if the value is different
     if (width, height) != self.__cached_size:
         self.__cached_size = (width, height)
         return self._impl.setSize(
             max(int(pointsToPixels(width)), 1),
             max(int(pointsToPixels(height)), 1)
         )
     else:
         return True
 def setPosition(self, x, y):
     # OPTIMIZATION BEGIN:
     # Caching last set position for doing it only if the value is different
     if (x, y) != self.__cached_position:
         self.__cached_position = (x, y)
         return self._impl.setPosition(
             int(pointsToPixels(x)),
             int(pointsToPixels(y))
         )
     else:
         return True
 def __init__(self, xPos, yPos, width, height):
     # Convert from points to pixels
     xPos = int(pointsToPixels(xPos))
     yPos = int(pointsToPixels(yPos))
     width = max(int(pointsToPixels(width)), 1)
     height = max(int(pointsToPixels(height)), 1)
     self.__cached_opacity = None
     self.__cached_position = None
     self.__cached_size = None
     self._impl = _graphics.TransparentWindow(xPos, yPos,
                                              width, height)
Beispiel #6
0
 def setSize( self, width, height ):
     width = max( int(pointsToPixels(width)), 1 )
     height = max( int(pointsToPixels(height)), 1 )
     return self._impl.setSize( width, height )
Beispiel #7
0
 def setPosition( self, x, y ):
     x = int( pointsToPixels( x ))
     y = int( pointsToPixels( y ))
     return self._impl.setPosition( x, y )