Пример #1
0
 def save(self,path,image_type):
     w,h = self.GetSizeTuple()
     bitmap = wx.wxEmptyBitmap(w,h)
     dc = wx.wxMemoryDC()
     dc.SelectObject(bitmap)
     #self.update()
     # The background isn't drawn right without this cluge.
     #fill_color = get_color(self.background_color)
     fill_color = get_color('white')
     dc.SetPen(wx.wxPen(fill_color))
     dc.SetBrush(wx.wxBrush(fill_color)) #how to handle transparency???
     dc.DrawRectangle(0,0,w,h)
     dc.SetPen(wx.wxNullPen)
     dc.SetBrush(wx.wxNullBrush)
     # end cluge
     self.draw(dc)
     image = wx.wxImageFromBitmap(bitmap)
     wx.wxInitAllImageHandlers()
     image.SaveFile(path,image_type_map[image_type])
Пример #2
0
def getGetMinusImage():
    return wxImageFromBitmap(getGetMinusBitmap())
Пример #3
0
def getGetHandImage():
    return wxImageFromBitmap(getGetHandBitmap())
Пример #4
0
def getProjectImage():
    return wxImageFromBitmap(getProjectBitmap())
Пример #5
0
def getPlusImage():
    return wxImageFromBitmap(getPlusBitmap())
Пример #6
0
def getLogoBigImage():
    return wxImageFromBitmap(getLogoBigBitmap())
Пример #7
0
def getFile1Image():
    return wxImageFromBitmap(getFile1Bitmap())
Пример #8
0
def getLogoSmallImage():
    return wxImageFromBitmap(getLogoSmallBitmap())
Пример #9
0
def getFile1Image():
    return wxImageFromBitmap(getFile1Bitmap())
Пример #10
0
def getProjectImage():
    return wxImageFromBitmap(getProjectBitmap())
Пример #11
0
def getLogoBigImage():
    return wxImageFromBitmap(getLogoBigBitmap())
Пример #12
0
def getPlusImage():
    return wxImageFromBitmap(getPlusBitmap())
Пример #13
0
def getLogoSmallImage():
    return wxImageFromBitmap(getLogoSmallBitmap())