예제 #1
0
    def __init__(self, x, y, xport=0, yport=0, width=None, height=None,
                 wport=None, hport=None):
        """
        Arguments:

        - ``width`` -- The width of the view.  If set to :const:`None`,
          it will become ``sge.game.width - xport``.
        - ``height`` -- The height of the view.  If set to
          :const:`None`, it will become ``sge.game.height - yport``.

        All other arugments set the respective initial attributes of the
        view.  See the documentation for :class:`sge.View` for more
        information.
        """
        self.rd = {}
        self.rd["x"] = x
        self.rd["y"] = y
        self.xport = xport
        self.yport = yport
        self.__width = width if width else sge.game.width - xport
        self.__height = height if height else sge.game.height - yport
        v_limit(self)
        self.wport = wport
        self.hport = hport
예제 #2
0
 def x(self, value):
     self.rd["x"] = value
     v_limit(self)
예제 #3
0
 def width(self, value):
     self.__width = value
     v_limit(self)
예제 #4
0
 def height(self, value):
     self.__height = value
     v_limit(self)
예제 #5
0
 def y(self, value):
     self.rd["y"] = value
     v_limit(self)