예제 #1
0
        /// <summary>
        /// Flip image over axe X
        /// </summary>
        private void HorizontalFlipButtonClick(object sender, EventArgs e)
        {
            CloseAllPopUps(sender, e);
            ImageTask task = new FlipHorizontal(ImageModification.FlipHorizontally, imageSet);

            taskControl.Add(task);
            taskControl.CheckAndProcess();
            log.Add("Image flipped vertically");
        }
예제 #2
0
 private void FillFuncContainer()
 {
     funcContainer = new Dictionary <string, Action <BitmapData, int> >
     {
         { "blackwhite", (data, bitsPerPixel) => ConvertToBlackWhite.Proceed(data, bitsPerPixel) },
         { "horizontalflip", (data, bitsPerPixel) => FlipHorizontal.Proceed(data, bitsPerPixel) },
         { "increasecontrast", (data, bitsPerPixel) => IncreaseContrast.Proceed(data, bitsPerPixel) },
         { "increasebrightness", (data, bitsPerPixel) => IncreaseBrightness.Proceed(data, bitsPerPixel) },
         { "increasesaturation", (data, bitsPerPixel) => IncreaseSaturation.Proceed(data, bitsPerPixel) }
     };
 }
예제 #3
0
 public void CreateMainMenu(Gtk.Menu menu)
 {
     menu.Append(AddNewLayer.CreateAcceleratedMenuItem(Gdk.Key.N, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
     menu.Append(DeleteLayer.CreateAcceleratedMenuItem(Gdk.Key.Delete, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
     menu.Append(DuplicateLayer.CreateAcceleratedMenuItem(Gdk.Key.D, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
     menu.Append(MergeLayerDown.CreateAcceleratedMenuItem(Gdk.Key.M, Gdk.ModifierType.ControlMask));
     menu.Append(ImportFromFile.CreateMenuItem());
     menu.AppendSeparator();
     menu.Append(FlipHorizontal.CreateMenuItem());
     menu.Append(FlipVertical.CreateMenuItem());
     menu.Append(RotateZoom.CreateMenuItem());
     menu.AppendSeparator();
     menu.Append(Properties.CreateAcceleratedMenuItem(Gdk.Key.F4, Gdk.ModifierType.None));
 }
예제 #4
0
파일: ImageActions.cs 프로젝트: ywscr/Pinta
		public void CreateMainMenu (Gtk.Menu menu)
		{
			menu.Append (CropToSelection.CreateAcceleratedMenuItem (Gdk.Key.X, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.Append (AutoCrop.CreateAcceleratedMenuItem (Gdk.Key.X, Gdk.ModifierType.Mod1Mask | Gdk.ModifierType.ControlMask));
			menu.Append (Resize.CreateAcceleratedMenuItem (Gdk.Key.R, Gdk.ModifierType.ControlMask));
			menu.Append (CanvasSize.CreateAcceleratedMenuItem (Gdk.Key.R, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
			menu.AppendSeparator ();
			menu.Append (FlipHorizontal.CreateMenuItem ());
			menu.Append (FlipVertical.CreateMenuItem ());
			menu.AppendSeparator ();
			menu.Append (RotateCW.CreateAcceleratedMenuItem (Gdk.Key.H, Gdk.ModifierType.ControlMask));
			menu.Append (RotateCCW.CreateAcceleratedMenuItem (Gdk.Key.G, Gdk.ModifierType.ControlMask));
			menu.Append (Rotate180.CreateAcceleratedMenuItem (Gdk.Key.J, Gdk.ModifierType.ControlMask));
			menu.AppendSeparator ();
			menu.Append (Flatten.CreateAcceleratedMenuItem (Gdk.Key.F, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
		}
예제 #5
0
        public List <KeyValuePair <string, object> > Serialize()
        {
            var list = new List <KeyValuePair <string, object> > ();

            list.Add(new KeyValuePair <string, object>("id", Id.ToString().AddCitations()));
            foreach (var image in Images)
            {
                list.Add(new KeyValuePair <string, object> ("images", image.Serialize()));
            }

            list.Add(new KeyValuePair <string, object>("fps", Fps.ToString()));
            list.Add(new KeyValuePair <string, object>("playback", Playback.ToString()));
            list.Add(new KeyValuePair <string, object>("flip_horizontal", FlipHorizontal.ToString()));
            list.Add(new KeyValuePair <string, object>("flip_vertical", FlipHorizontal.ToString()));

            return(list);
        }
예제 #6
0
        public void RegisterActions(Gtk.Application app, GLib.Menu menu)
        {
            app.AddAccelAction(CropToSelection, "<Primary><Shift>X");
            menu.AppendItem(CropToSelection.CreateMenuItem());

            app.AddAccelAction(AutoCrop, "<Ctrl><Alt>X");
            menu.AppendItem(AutoCrop.CreateMenuItem());

            app.AddAccelAction(Resize, "<Primary>R");
            menu.AppendItem(Resize.CreateMenuItem());

            app.AddAccelAction(CanvasSize, "<Primary><Shift>R");
            menu.AppendItem(CanvasSize.CreateMenuItem());

            var flip_section = new GLib.Menu();

            menu.AppendSection(null, flip_section);

            app.AddAction(FlipHorizontal);
            flip_section.AppendItem(FlipHorizontal.CreateMenuItem());

            app.AddAction(FlipVertical);
            flip_section.AppendItem(FlipVertical.CreateMenuItem());

            var rotate_section = new GLib.Menu();

            menu.AppendSection(null, rotate_section);

            app.AddAccelAction(RotateCW, "<Primary>H");
            rotate_section.AppendItem(RotateCW.CreateMenuItem());

            app.AddAccelAction(RotateCCW, "<Primary>G");
            rotate_section.AppendItem(RotateCCW.CreateMenuItem());

            app.AddAccelAction(Rotate180, "<Primary>J");
            rotate_section.AppendItem(Rotate180.CreateMenuItem());

            var flatten_section = new GLib.Menu();

            menu.AppendSection(null, flatten_section);

            app.AddAccelAction(Flatten, "<Primary><Shift>F");
            flatten_section.AppendItem(Flatten.CreateMenuItem());
        }
예제 #7
0
        public void RegisterActions(Gtk.Application app, GLib.Menu menu)
        {
            app.AddAccelAction(AddNewLayer, "<Primary><Shift>N");
            menu.AppendItem(AddNewLayer.CreateMenuItem());

            app.AddAccelAction(DeleteLayer, "<Primary><Shift>Delete");
            menu.AppendItem(DeleteLayer.CreateMenuItem());

            app.AddAccelAction(DuplicateLayer, "<Primary><Shift>D");
            menu.AppendItem(DuplicateLayer.CreateMenuItem());

            app.AddAccelAction(MergeLayerDown, "<Primary>M");
            menu.AppendItem(MergeLayerDown.CreateMenuItem());

            app.AddAction(ImportFromFile);
            menu.AppendItem(ImportFromFile.CreateMenuItem());

            var flip_section = new GLib.Menu();

            menu.AppendSection(null, flip_section);

            app.AddAction(FlipHorizontal);
            flip_section.AppendItem(FlipHorizontal.CreateMenuItem());

            app.AddAction(FlipVertical);
            flip_section.AppendItem(FlipVertical.CreateMenuItem());

            app.AddAction(RotateZoom);
            flip_section.AppendItem(RotateZoom.CreateMenuItem());

            var prop_section = new GLib.Menu();

            menu.AppendSection(null, prop_section);

            app.AddAccelAction(Properties, "F4");
            prop_section.AppendItem(Properties.CreateMenuItem());

            app.AddAction(MoveLayerDown);
            app.AddAction(MoveLayerUp);
        }