Example #1
0
        public CropBox(ScreenshotEditor editor, bool editing, ShapeSettingsPanel panel)
            : base(editor, Color.Black, 20, panel)
            //: base(editor, getOppositeColor(editor.BackgroundColor), 20, null)
        {
            rightHit = false;

            Size s = editor.Screenshot.Size;
            //s.Width += ConfigDialog.Instance.GrabMargin;
            //s.Height += ConfigDialog.Instance.GrabMargin;
            int w = s.Width;
            int h = s.Height;

// ReSharper disable PossibleLossOfFraction
            addHandle("start", new PointF(-w / 2, -h / 2));
            addHandle("end", new PointF(w / 2, h / 2));
// ReSharper restore PossibleLossOfFraction

            Editing = editing;

            sp = (CropShapeSettingsPanel)panel;
        }
Example #2
0
 public CropBox(ScreenshotEditor editor, XPathNavigator element, bool editing) : base(editor, element, createSettingsPanel())
 {
     sp      = settingsPanel as CropShapeSettingsPanel;
     Editing = editing;
 }