def init(self): rootNode = g_Player.getRootNode() orig = ImageNode(parent = rootNode, href='../graphics/testfiles/hsl.png') invert = ImageNode(parent = rootNode, href='../graphics/testfiles/hsl.png', pos=(orig.size.x+10, 0)) invert.setEffect(avg.InvertFXNode())
def init(self): rootNode = g_Player.getRootNode() background = ImageNode(parent=rootNode, href='../graphics/testfiles/hsl.png', size=(640,640)) self.hsl_fx = avg.HueSatFXNode() background.setEffect(self.hsl_fx) self.sat = avg.WordsNode(pos=(800, 200), text="Sat: " + str(self.hsl_fx.saturation), parent=rootNode) self.light = avg.WordsNode(pos=(800, 250), text= "Bright" + str(self.hsl_fx.lightness), parent=rootNode) self.colorize = avg.WordsNode(pos=(800, 300), text="Colorized: " + str(self.hsl_fx.colorize), parent=rootNode) self.hue = avg.WordsNode(pos=(800, 350), text="Hue: " + str(self.hsl_fx.hue), parent=rootNode) rootNode.connectEventHandler(avg.KEYDOWN, avg.NONE, self, self.__onKeyDown) g_Player.setOnFrameHandler(self._increaseHue)