Example #1
0
        private void UpdateOccOptions()
        {
            var optionsSetup = _actionGraph[InputNames.OptionsSetupInput].Get <OptionsSetup>();
            var occOptions   = optionsSetup.UpdateSectionNode(OptionSectionNames.Background);

            _view.SetBackgroundColor(ShapeUtils.GetOccColor(occOptions.GetColorValue(0)));
            if (occOptions.GetBoolValue(2))
            {
                _view.SetAntialiasingOn();
            }
            else
            {
                _view.SetAntialiasingOff();
            }
            var firstColor  = occOptions.GetColorValue(4);
            var secondColor = occOptions.GetColorValue(5);

            GeomUtils.MakeGradient("background2.bmp", 32, 128, firstColor, secondColor);
            //SetNewGradientBackground();
            _viewer.Redraw();
        }