//create and return shader. public IGazeHighlightShader CreateShader(EHighlightShaderType shaderType) { IGazeHighlightShader returnShader = null; switch (shaderType) { case EHighlightShaderType.RedToGreen: returnShader = new RedToGreenShader(); break; } return(returnShader); }
//Constructor public GazeHighlight(FixationDetection fixationWorker, Graphics zoomerCanvas, EHighlightShaderType shaderType, ZoomLens LensForm) { lensForm = LensForm; fixationWorker.currentProgress += setPercent; canvas = zoomerCanvas; shaderMachine = new GazeHighlightShaderFactory(); gazeShader = shaderMachine.CreateShader(shaderType); fixationPercent = 0; currentGaze = new Point(); }