def setFillStyle(self, fillStyle):
        fillStyle = str(fillStyle).strip()
        if fillStyle.startswith("rgba("):
            end = fillStyle.find(")", 12)
            if end > -1:
                guts = fillStyle[5:end].split(",")
                if len(guts) == 4:
                    self.context.fillAlpha = float(guts[3])
                    self.context.fillStyle = "rgb(" + guts[0] + "," + guts[1] + "," + guts[2] + ")"


        else:
            self.context.fillAlpha = 1
            self.context.fillStyle = fillStyle
dataset/ETHPy150Open anandology/pyjamas/library/gwt/Canvas/GWTCanvasImplIE6.py/GWTCanvasImplIE6.setFillStyle/original