コード例 #1
0
        public override void Use(Layer activeLayer, Layer previewLayer, IEnumerable <Layer> allLayers, IReadOnlyList <Coordinates> recordedMouseMovement, SKColor color)
        {
            int   toolSize         = Toolbar.GetSetting <SizeSetting>("ToolSize").Value;
            float correctionFactor = Toolbar.GetSetting <FloatSetting>("CorrectionFactor").Value;

            Mode = Toolbar.GetEnumSetting <BrightnessMode>("BrightnessMode").Value;

            if (Session.IsCtrlDown)
            {
                ChangeBrightness(activeLayer, recordedMouseMovement[^ 1], toolSize, -correctionFactor);
コード例 #2
0
        public override LayerChange[] Use(Layer layer, List <Coordinates> coordinates, Color color)
        {
            int   toolSize         = Toolbar.GetSetting <SizeSetting>("ToolSize").Value;
            float correctionFactor = Toolbar.GetSetting <FloatSetting>("CorrectionFactor").Value;

            Mode = Toolbar.GetEnumSetting <BrightnessMode>("BrightnessMode").Value;

            LayerChange[] layersChanges = new LayerChange[1];
            if (Keyboard.IsKeyDown(Key.LeftCtrl))
            {
                layersChanges[0] = new LayerChange(ChangeBrightness(layer, coordinates[0], toolSize, -correctionFactor), layer);
            }
            else
            {
                layersChanges[0] = new LayerChange(ChangeBrightness(layer, coordinates[0], toolSize, correctionFactor), layer);
            }

            return(layersChanges);
        }