

def draw(self):
    r = self.sprite2.get_AABB()
    (left, bottom) = (r.left, r.bottom)
    (right, top) = (r.right, r.top)
    glBegin(GL_LINE_LOOP)
    glColor4f(1, 0, 0, 1)
    glVertex3f(left, bottom, 0)
    glVertex3f(right, bottom, 0)
    glVertex3f(right, top, 0)
    glVertex3f(left, top, 0)
    glEnd()
    bl = self.sprite1.point_to_world((0, 0))
    (x, y) = (self.sprite1.width, self.sprite2.height)
    tr = self.sprite1.point_to_world((x, y))
    (left, bottom) = (bl.x, bl.y)
    (right, top) = (tr.x, tr.y)
    bl = self.sprite1.point_to_world((0, 0))
    glPointSize(16)
    glBegin(GL_POINTS)
    glColor4f(1, 1, 0, 1)
    glVertex3f(bl.x, bl.y, 0)
    glEnd()

dataset/ETHPy150Open los-cocos/cocos/test/test_sprite_aabb.py TestLayer.draw/original