Пример #1
0
 public IpGrid(int sizeX, int sizeY, IpPicture pic, ViewBox viewBox)
 {
     this.sizeX   = sizeX;
     this.sizeY   = sizeY;
     this.pic     = pic;
     this.viewBox = viewBox;
 }
Пример #2
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;
        }
Пример #3
0
 public IpPicture(IpCursor selectCursor, IpCursor lastCursor, int sizeX, int sizeY, ViewBox viewBox)
 {
     lines             = new LinePic[counterLines];
     circles           = new Ellipse[counterCircles];
     splines           = new IpSpline[counterSplines];
     this.selectCursor = selectCursor;
     this.lastCursor   = lastCursor;
     vectorPicture     = new VectorPicture();
     this.sizeX        = sizeX;
     this.sizeY        = sizeY;
     this.ViewBox      = viewBox;
 }