コード例 #1
0
 def draw(self, painter):
     c = self.interface.controller
     w, h = c.width(), c.height()
     ortho_projection(w,h)
     
     painter.drawImage(self.image_rect, self.image)
     
     self.setup_projection()
コード例 #2
0
ファイル: messages.py プロジェクト: THECAESAR279/pyasteroids
    def draw(self):
        self.controller.draw_parent(self)

        ortho_projection(self.controller.width(), self.controller.height())

        self.qpainter.fillRect(self.rect, self.color)
        self.qpainter.setFont(self.font)
        self.qpainter.setPen(self.font_color)
        self.bounding_text_rect = self.qpainter.drawText(
            self.rect, qt_center_flag, self.str)
コード例 #3
0
ファイル: messages.py プロジェクト: giulianoxt/pyasteroids
    def draw(self):
        self.controller.draw_parent(self)
        
        ortho_projection(
            self.controller.width(), self.controller.height()
        )

        self.qpainter.fillRect(self.rect, self.color)
        self.qpainter.setFont(self.font)
        self.qpainter.setPen(self.font_color)
        self.bounding_text_rect = self.qpainter.drawText(self.rect, qt_center_flag, self.str)
コード例 #4
0
 def draw(self):        
     self.controller.draw_parent(self)
     
     ortho_projection(
         self.controller.width(), self.controller.height()
     )
     
     glMatrixMode(GL_MODELVIEW)
     glLoadIdentity()
     
     painter = self.qpainter
     
     for field in self.fields:
         field.draw(painter, self.field_color, self.info[field.name])
     
     self.missile.draw(painter)
     self.radar.draw(painter)
コード例 #5
0
ファイル: messages.py プロジェクト: THECAESAR279/pyasteroids
    def draw(self):
        self.controller.draw_parent(self)

        ortho_projection(self.controller.width(), self.controller.height())

        self.qpainter.drawImage(self.image_rect, self.image)

        i = int((self.elapsed / self.duration) * self.message_sz)
        text = self.str[0:i]

        if (self.has_cursor):
            text += '|'

        self.qpainter.setFont(self.font)
        self.qpainter.setPen(self.font_color)

        #self.qpainter.fillRect(self.text_rect, self.font_color)
        self.qpainter.drawText(self.text_rect, qt_sms_flag, text)
コード例 #6
0
ファイル: messages.py プロジェクト: giulianoxt/pyasteroids
    def draw(self):
        self.controller.draw_parent(self)
        
        ortho_projection(
            self.controller.width(), self.controller.height()
        )

        self.qpainter.drawImage(self.image_rect, self.image)
        
        i = int((self.elapsed / self.duration) * self.message_sz)
        text = self.str[0:i]
        
        if (self.has_cursor):
            text += '|'
        
        self.qpainter.setFont(self.font)
        self.qpainter.setPen(self.font_color)
        
        #self.qpainter.fillRect(self.text_rect, self.font_color)
        self.qpainter.drawText(self.text_rect, qt_sms_flag, text)