+ if self.view_port is None:
+ rect = self.rect
+ area = None
+ else:
+ rect = self.pos
+ area = self.view_port
+ surface.blit(self.surface, rect, area)
+ if self.view_port is not None:
+ self.draw_arrows(surface)
+
+ def draw_arrows(self, surface):
+ if self.view_port.top > 0:
+ up = resources.get_image('bits', 'arrow_on.png',
+ transforms=(EIGHT_BIT,))
+ icon_size = up.get_rect().height
+ pos = (self.pos[0] + self.view_port.width - icon_size, self.pos[1])
+ surface.blit(up, pos)
+ if self.view_port.bottom < self.surface.get_rect().bottom:
+ down = resources.get_image('bits', 'arrow_on.png',
+ transforms=(R180, EIGHT_BIT))
+ icon_size = down.get_rect().height
+ pos = (self.pos[0] + self.view_port.width - icon_size,
+ self.pos[1] + self.view_port.height - icon_size)
+ surface.blit(down, pos)