def OnDrawItem(self, dc, rect, index):
"""OnDrawItem for Layout."""
face = self.faces[index]
dc.DrawBitmap(face.bmp, rect.x + 2,
((rect.height - face.bmp.GetHeight()) / 2) + rect.y)
textx = rect.x + 2 + face.bmp.GetWidth() + 2
label_rect = wx.Rect(textx, rect.y, rect.width - textx, rect.height)
label = util.LABEL_FACE.format(
face.attr.gender,
face.attr.age,
face.attr.hair,
face.attr.facial_hair,
face.attr.makeup,
face.attr.emotion,
face.attr.occlusion,
face.attr.exposure,
face.attr.head_pose,
face.attr.accessories
)
dc.DrawLabel(label, label_rect, wx.ALIGN_LEFT | wx.ALIGN_TOP)
评论列表
文章目录