コード例 #1
0
ファイル: engine.py プロジェクト: Fiona/Myrmidon
 def __init__(self, x, y, line_width=0):
     Entity.__init__(self)
     self.x = x
     self.y = y
     self._line_width = line_width
     self.status = S_FREEZE
     self._width = 0
     self._height = 0
コード例 #2
0
ファイル: feature_test.py プロジェクト: Fiona/Myrmidon
 def _setup(self):
     self.image = None
     for i in range(2):
         e = Entity()
         e.image = Application.G_WORD
         e.x = self.x - 5 + i*10
         e.y = self.y - 5 + i*10
         e.blend = True
コード例 #3
0
ファイル: feature_test.py プロジェクト: Fiona/Myrmidon
 def _setup(self):
     self.image = None
     for i in range(3):
         e = Entity()
         e.image = Application.G_WORD
         e.x = self.x - 10 + i*10
         e.y = self.y - 10 + i*10
         e.z = i
コード例 #4
0
ファイル: engine.py プロジェクト: arcticshores/Myrmidon
 def __init__(self, font, x, y, alignment, text, antialias = True):
     Entity.__init__(self)
     self.font = font
     self.x = x
     self.y = y
     self.z = -500.0
     self.alignment = alignment
     self.text = text
     self.antialias = antialias
     self._is_text = True
     self.rotation = 0.0
     self.normal_draw = False
コード例 #5
0
ファイル: engine.py プロジェクト: arcticshores/Myrmidon
 def __init__(self, font, x, y, alignment, text, antialias=True):
     Entity.__init__(self)
     self.font = font
     self.x = x
     self.y = y
     self.z = -500.0
     self.alignment = alignment
     self.text = text
     self.antialias = antialias
     self._is_text = True
     self.rotation = 0.0
     self.normal_draw = False
コード例 #6
0
ファイル: engine.py プロジェクト: Fiona/Myrmidon
        def __init__(self, font, x, y, alignment, text, antialias = True):
            Entity.__init__(self)
            self.font = font
            self.x = x
            self.y = y
            self.z = 0
            self.alignment = alignment
            self.text = text
            self.antialias = antialias
            self._is_text = True
            self.rotation = 0.0

            self.generate_text_image()
コード例 #7
0
        def __init__(self, font, x, y, alignment, text, antialias=True):
            Entity.__init__(self)
            self.font = font
            self.x = x
            self.y = y
            self.z = 0
            self.alignment = alignment
            self.text = text
            self.antialias = antialias
            self._is_text = True
            self.rotation = 0.0

            self.generate_text_image()
コード例 #8
0
ファイル: engine.py プロジェクト: jvlomax/Myrmidon
 def __init__(self, x, y, points, closed=True, line_width=0):
     """
     :param x: starting x coordinate
     :param y: starting y coordinate
     :param points: list of 2-tuples containing vertex coordinates of a convex polygon.
                    0,0 is the top-left of the shape. Points should wind clockwise.
     :param closed: if False, and line_width is set, the last line is not connected to the first.
     :param line_width: if greater than 0, polygon is drawn un-filled with the given line width, otherwise
                        polygon is filled. Defaults to 0 (filled)
     """
     Entity.__init__(self)
     self.x = x
     self.y = y
     self._points = points
     self._closed = closed
     self.line_width = line_width
     self.status = S_FREEZE
     self._update_points(points)