示例#1
0
 public void Update(string ImgPath, string MaskPath)
 {
     mask = null;
     BoxImg.Load(ImgPath);
     BoxMask.Load(MaskPath);
     this.trackBar_Scroll(null, null);
 }
示例#2
0
 public OverlayWindow(string ImgPath, string MaskPath)
 {
     InitializeComponent();
     mask = null;
     //BoxImg.Controls.Add(BoxMask);
     BoxMask.Parent   = BoxImg;
     BoxMask.Location = Point.Empty;
     BoxImg.Load(ImgPath);
     BoxMask.Load(MaskPath);
 }
示例#3
0
        private void BtnNext_Click(object sender, EventArgs e)
        {
            try
            {
                this.processing.Next();
                BoxImg.Load(this.processing.GetImagePath());
                BoxMask.Load(this.processing.GetMaskPath());
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

            this.UpdateProgressBar();
            this.UpdateOverlay();
        }
示例#4
0
        private void DrawOuterBoundsHandle(BoxMask boxMask)
        {
            boxHandle.handleColor    = DeformEditorSettings.SolidHandleColor;
            boxHandle.wireframeColor = DeformEditorSettings.LightHandleColor;
            boxHandle.center         = boxMask.OuterBounds.center;
            boxHandle.size           = boxMask.OuterBounds.size;

            using (new Handles.DrawingScope(Matrix4x4.TRS(boxMask.Axis.position, boxMask.Axis.rotation, boxMask.Axis.lossyScale)))
            {
                using (var check = new EditorGUI.ChangeCheckScope())
                {
                    boxHandle.DrawHandle();
                    if (check.changed)
                    {
                        Undo.RecordObject(boxMask, "Changed Size");
                        boxMask.OuterBounds = new Bounds(boxHandle.center, boxHandle.size);
                    }
                }
            }
        }
示例#5
0
        private void BtnLoad_Click(object sender, EventArgs e)
        {
            try
            {
                this.processing.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                return;
            }

            BtnOverlay.Enabled = true;
            BtnPrev.Enabled    = true;
            BtnNext.Enabled    = true;
            BtnSave.Enabled    = true;

            progressBar.Maximum = this.processing.GetCountImages();

            BoxImg.Load(this.processing.GetImagePath());
            BoxMask.Load(this.processing.GetMaskPath());
        }