Exemplo n.º 1
0
        public GizmoEditor(IpPicture pic, IpGrid grid)
        {
            Color      color = Color.FromArgb(50, 0, 250, 50);
            SolidBrush brush = new SolidBrush(color);

            selectRect = new SelectRect(pic, brush);
            this.pic   = pic;
            this.grid  = grid;
        }
Exemplo n.º 2
0
        public GizmoLine(IpPicture pic, IpGrid grid) : base(pic, grid)
        {
            controllerPen         = new Pen(Color.Blue);
            selectedControllerPen = new Pen(Color.Violet);
            moveCursor            = new IpCursor(5, controllerPen);
            p1Cursor = new IpCursor(5, controllerPen);
            p2Cursor = new IpCursor(5, controllerPen);

            CreateGizmo();
        }
Exemplo n.º 3
0
 public GizmoSpline(IpPicture pic, IpGrid grid) : base(pic, grid)
 {
     sectorBrush           = new SolidBrush(Color.FromArgb(50, 150, 0, 150));
     textBrush             = new SolidBrush(Color.Black);
     gizmoPen              = new Pen(Color.Gray);
     controllerPen         = new Pen(Color.Blue);
     selectedControllerPen = new Pen(Color.Violet);
     moveCursor            = new IpCursor(5, controllerPen);
     p1Cursor              = new IpCursor(5, controllerPen);
     p2Cursor              = new IpCursor(5, controllerPen);
     p3Cursor              = new IpCursor(5, controllerPen);
     p4Cursor              = new IpCursor(5, controllerPen);
     rotationCursor        = new IpCursor(10, controllerPen);
     CreateGizmo();
 }
Exemplo n.º 4
0
 public GizmoMixed(IpPicture pic, IpGrid grid) : base(pic, grid)
 {
     gizmoPen              = new Pen(Color.Green);
     controllerPen         = new Pen(Color.Violet);
     selectedControllerPen = new Pen(Color.Blue);
     sectorBrush           = new SolidBrush(Color.FromArgb(50, 150, 0, 150));
     textBrush             = new SolidBrush(Color.Black);
     moveCursor            = new IpCursor(5, controllerPen);
     xScaleR        = new IpCursor(5, controllerPen);
     xScaleL        = new IpCursor(5, controllerPen);
     yScaleU        = new IpCursor(5, controllerPen);
     yScaleD        = new IpCursor(5, controllerPen);
     xyScaleUR      = new IpCursor(5, controllerPen);
     rotationCursor = new IpCursor(10, controllerPen);
     CreateGizmo();
 }
Exemplo n.º 5
0
        public PictureEditor(Control Holst, float width, float height)
        {
            this.sizeX = Holst.Width;
            this.sizeY = Holst.Height;
            ViewBox    = new ViewBox(sizeX / 2 - width / 2, sizeY / 2 - height / 2, width, height);
            graph      = Holst.CreateGraphics();

            pic         = new IpPicture(SelectCursor, LastCursor, sizeX, sizeY, ViewBox);
            ipGrid      = new IpGrid(sizeX, sizeY, Picture, ViewBox);
            gizmoEditor = new GizmoEditor(Picture, Grid);
            ClearPicture();
            bmp   = new Bitmap(sizeX, sizeY, graph);
            gBuff = Graphics.FromImage(bmp);
            gBuff.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            editMode            = EditMode.LineModeM;

            Holst.MouseDown += Holst_MouseDown;
            Holst.MouseUp   += Holst_MouseUp;
            Holst.MouseMove += Holst_MouseMove;
            Holst.Paint     += Holst_Paint;
        }
Exemplo n.º 6
0
 public IpGizmo(IpPicture pic, IpGrid grid)
 {
     this.pic  = pic;
     this.grid = grid;
 }