Example #1
0
        public override void OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            base.OnMouseDown(sender, e);

            // PhotoshopManager.Initialize();
            CurrentBrushValue = PhotoshopManager.GetBrushSettings().Hardness;
        }
 public override void OnMouseDown(object sender, MouseButtonEventArgs e)
 {
     // PhotoshopManager.Initialize();
     CurrentBrushValue = PhotoshopManager.GetBrushSettings().Opacity;
     Trace.WriteLine("Yes? " + CurrentBrushValue);
     base.OnMouseDown(sender, e);
 }
Example #3
0
        public override void OnMouseDown(object sender, MouseButtonEventArgs e)
        {
            // PhotoshopManager.Initialize();
            CurrentBrushValue = PhotoshopManager.GetBrushSettings().Diameter *CurrentZoom;
            CurrentZoom       = PhotoshopManager.GetZoom();

            base.OnMouseDown(sender, e);
        }
Example #4
0
        public ExpressBrushRadiusTool() : base()
        {
            PhotoshopManager.Initialize();

            // Set icon
            var uriSource = new Uri("Resources/Icons/Icon_Brush_Radius.png", UriKind.Relative);

            var image = new Image
            {
                Source = new BitmapImage(uriSource),
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center,
            };

            ButtonControl.Content = image;
        }
        public ExpressBrushSettingToolBase() : base()
        {
            PhotoshopManager.Initialize();

            // Create popup that draws brush radius
            BrushPopup = new Popup
            {
                AllowsTransparency = true,
                Placement          = PlacementMode.Center
            };

            var border = new Border
            {
                Background          = Brushes.Red,
                VerticalAlignment   = VerticalAlignment.Center,
                HorizontalAlignment = HorizontalAlignment.Center,
                Margin = new Thickness(20)
            };

            BrushPopup.Child = border;

            ButtonControl.Template = (ControlTemplate)Application.Current.MainWindow.Resources["RoundButton"];
        }
        public override void OnMouseUp(object sender, MouseButtonEventArgs e)
        {
            base.OnMouseUp(sender, e);

            PhotoshopManager.SetBrushOpacity(Math.Clamp(GetBrushSettingValue(), 1, 100));
        }
Example #7
0
        public override void OnMouseUp(object sender, MouseButtonEventArgs e)
        {
            base.OnMouseUp(sender, e);

            PhotoshopManager.SetBrushHardness(GetBrushSettingValue());
        }
Example #8
0
        public override void OnMouseUp(object sender, MouseButtonEventArgs e)
        {
            base.OnMouseUp(sender, e);

            PhotoshopManager.SetBrushDiameter(CurrentBrushValue / CurrentZoom);
        }