Exemple #1
0
class GState(object):

    pencolor = black
    fillcolor = black
    textcolor = black
    backcolor = white
    pensize = 1
    font = application_font
    
    win_pen = gdip.Pen(pencolor._win_argb, 1)
    win_fill_brush = gdip.SolidBrush(fillcolor._win_argb)
    win_text_brush = gdip.SolidBrush(textcolor._win_argb)
    win_bg_brush = gdip.SolidBrush(backcolor._win_argb)
    
    def __init__(self, clone = None):
        if clone:
            self.__dict__.update(clone.__dict__)
Exemple #2
0
 def set_fillcolor(self, c):
     state = self._state
     state.fillcolor = c
     if self.fillcolor.image:
         tb = gdip.TextureBrush(self.fillcolor.image)
         state.win_fill_brush = tb
     else:
         state.win_fill_brush = gdip.SolidBrush(c._win_argb)
Exemple #3
0
 def set_backcolor(self, c):
     state = self._state
     state.backcolor = c
     state.win_bg_brush = gdip.SolidBrush(c._win_argb)
Exemple #4
0
 def set_textcolor(self, c):
     state = self._state
     state.textcolor = c
     state.win_text_brush = gdip.SolidBrush(c._win_argb)
Exemple #5
0
 def set_fillcolor(self, c):
     state = self._state
     state.fillcolor = c
     state.win_fill_brush = gdip.SolidBrush(c._win_argb)