Ejemplo n.º 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__)
Ejemplo n.º 2
0
 def set_pensize(self, x):
     state = self._state
     state.pensize = x
     state.win_pen = gdip.Pen(state.pencolor._win_argb, x)
Ejemplo n.º 3
0
 def set_pencolor(self, c):
     state = self._state
     state.pencolor = c
     state.win_pen = gdip.Pen(c._win_argb, state.pensize)