Esempio n. 1
0
 // Methods
 public BezierOperation(MouseArea mc)
 {
     this.mouseAreaControl = null;
     this.currentGraph = null;
     this.revertMatrix = new Matrix();
     this.startPoint = PointF.Empty;
     this.currentOperate = BezierOperate.Draw;
     this.activePoints = new PointInfoCollection();
     this.editPath = new GraphicsPath();
     this.preInfo = null;
     this.reversePath = new GraphicsPath();
     this.editpath = new GraphicsPath();
     this.preDrawInfo = null;
     this.starttrend = PointF.Empty;
     this.endtrend = PointF.Empty;
     this.addInfo = null;
     this.moveinfo = null;
     this.movePoint = PointF.Empty;
     this.currentinfo = null;
     this.SubpathList = new Hashtable(0x10);
     this.oldstr = string.Empty;
     this.attributename = string.Empty;
     this.showcontrol = true;
     this.activeindex = new int[0];
     this.oldindex = -1;
     this.centerPoint = PointF.Empty;
     this.incenter = false;
     this.tooltips = new Hashtable(0x10);
     this.mouseAreaControl = mc;
     this.win32 = mc.win32;
     this.mouseAreaControl.DefaultCursor = SpecialCursors.bezierCursor;
 }
Esempio n. 2
0
 internal SelectOperation(MouseArea mousecontrol)
 {
     this.mouseAreaControl = null;
     this.toBeSelectedGraph = null;
     this.toBeSelectedPath = null;
     this.currentMousePoint = MousePoint.None;
     this.reversePath = new GraphicsPath();
     this.oriPath = new GraphicsPath();
     this.startpoint = PointF.Empty;
     this.movePoint = PointF.Empty;
     this.selectMatrix = new Matrix();
     this.totalmatrix = new Matrix();
     this.controlPoint = PointF.Empty;
     this.selectAreaPath = new GraphicsPath();
     this.AreaPoints = new ArrayList(0x10);
     this.ps = new PointF[8];
     this.rotateindex = 0;
     this.selectCollection = new SvgElementCollection();
     this.tooltips = new Hashtable(0x10);
     this.rotatepath = new GraphicsPath();
     this.mouseAreaControl = mousecontrol;
     this.win32 = this.mouseAreaControl.win32;
     this.mouseAreaControl.DefaultCursor = SpecialCursors.selectCursor;
     this.freeSelect = mouseAreaControl.PicturePanel.FreeSelect;
 }
Esempio n. 3
0
 // Methods
 public SymbolOperation()
 {
     this.mouseAreaControl = null;
     this.startPoint = Point.Empty;
     this.oldleft = 0f;
     this.oldtop = 0f;
 }
Esempio n. 4
0
 internal SymbolOperation(MouseArea mousearea)
 {
     this.startPoint = Point.Empty;
     this.oldleft = 0f;
     this.oldtop = 0f;
     this.mouseAreaControl = mousearea;
 }
Esempio n. 5
0
 internal ColorOperation(MouseArea mousecontrol)
 {
     this.mouseAreaControl = null;
     this.translatePath = new GraphicsPath();
     this.scalePath = new GraphicsPath();
     this.rotatePath = new GraphicsPath();
     this.equalPath = new GraphicsPath();
     this.skewxPath = new GraphicsPath();
     this.skewyPath = new GraphicsPath();
     this.anglescalePath = new GraphicsPath();
     this.vscalPath = new GraphicsPath();
     this.controlPoints = null;
     this.reversePath = new GraphicsPath();
     this.startPoint = PointF.Empty;
     this.win32 = new Win32();
     this.ratiomatrix = new Matrix();
     this.graphMatrix = new Matrix();
     this.selectMatrix = new Matrix();
     this.gradientMatrix = new Matrix();
     this.gradientPath = new GraphicsPath();
     this.gradientheight = 1f;
     this.centerPoint = PointF.Empty;
     this.gradientstr = string.Empty;
     this.colorpickerstr = string.Empty;
     this.mouseAreaControl = mousecontrol;
     this.win32 = mousecontrol.win32;
     this.gradientstr = DrawAreaConfig.GetLabelForName("gradienttransform").Trim();
     this.colorpickerstr = DrawAreaConfig.GetLabelForName("colorpicker").Trim();
 }
Esempio n. 6
0
 internal SubOperation(MouseArea mc, IPath path)
 {
     this.currentGraph = null;
     this.mouseAreaControl = null;
     this.mouseAreaControl = mc;
     this.CurrentGraph = path;
 }
Esempio n. 7
0
 // Methods
 public ViewOperation()
 {
     this.mouseAreaControl = null;
     this.startPoint = Point.Empty;
     this.oldleft = 0f;
     this.oldtop = 0f;
     this.reversePath =new GraphicsPath();
     this.win32 = new Win32();
 }
Esempio n. 8
0
 internal DrawOperation(MouseArea mousecontrol)
     : this()
 {
     this.mouseAreaControl = mousecontrol;
     this.win32 = this.mouseAreaControl.win32;
     this.openFileDialog1 = new OpenFileDialog();
     string text1 = DrawAreaConfig.GetLabelForName("filefilter").Trim();
     this.openFileDialog1.Filter = text1;
     this.openFileDialog1.Title = DrawAreaConfig.GetLabelForName("imagedialog").Trim();
     this.openFileDialog1.FileOk += new CancelEventHandler(this.openFileDialog1_FileOk);
 }
Esempio n. 9
0
 // Methods
 public DrawOperation()
 {
     this.mouseAreaControl = null;
     this.win32 = new Win32();
     this.tempPath = new GraphicsPath();
     this.drawPath = null;
     this.showdialog = false;
     this.filename = string.Empty;
     this.haveTextActive = false;
     this.startPoint = Point.Empty;
     this.mouseDown = false;
     this.reversePath = new GraphicsPath();
     this.first = true;
     this.list = new ArrayList();
     this.tooltips = new Hashtable();
     this.finish = false;
     this.redPath =new GraphicsPath();
 }
Esempio n. 10
0
 /// <summary>
 /// ������
 /// </summary>
 /// <param name="mc"></param>
 public DistanceOperation(MouseArea mc)
 {
     this.reversePath = new GraphicsPath();
     this.graph = null;
     this.points = new ArrayList();
     this.moveindex = -1;
     this.startpoint = PointF.Empty;
     this.prePoint = PointF.Empty;
     this.nextPoint = PointF.Empty;
     this.insertindex = -1;
     this.tooltips = new Hashtable(0x10);
     this.oldpoints = string.Empty;
     this.mousedown = false;
     this.mouseAreaControl = mc;
     this.win32 = mc.win32;
     this.mouseAreaControl.DefaultCursor = SpecialCursors.MeasureCursor;
     this.tempPath=new GraphicsPath();
     this.connectPoint=PointF.Empty;
 }
Esempio n. 11
0
 // Methods
 public SelectOperation()
 {
     this.mouseAreaControl = null;
     this.toBeSelectedGraph = null;
     this.toBeSelectedPath = null;
     this.currentMousePoint = MousePoint.None;
     this.reversePath = new GraphicsPath();
     this.oriPath = new GraphicsPath();
     this.startpoint = PointF.Empty;
     this.movePoint = PointF.Empty;
     this.selectMatrix = new Matrix();
     this.totalmatrix = new Matrix();
     this.controlPoint = PointF.Empty;
     this.selectAreaPath = new GraphicsPath();
     this.win32 = new Win32();
     this.AreaPoints = new ArrayList(0x10);
     this.ps = new PointF[8];
     this.rotateindex = 0;
     this.selectCollection = new SvgElementCollection();
     this.tooltips = new Hashtable(0x10);
     this.rotatepath = new GraphicsPath();
 }
Esempio n. 12
0
 // Methods
 public PolyOperation(MouseArea mc)
 {
     this.mouseAreaControl = null;
     this.win32 = null;
     this.reversePath = new GraphicsPath();
     this.graph = null;
     this.operate = PolyOperate.Draw;
     this.points = new PointF[0];
     this.moveindex = -1;
     this.startpoint = PointF.Empty;
     this.prePoint = PointF.Empty;
     this.nextPoint = PointF.Empty;
     this.insertindex = -1;
     this.tooltips = new Hashtable(0x10);
     this.oldpoints = string.Empty;
     this.mousedown = false;
     this.AreaPoints=new ArrayList();
     this.mouseAreaControl = mc;
     this.win32 = mc.win32;
     this.mouseAreaControl.PicturePanel.GraphChanged += new EventHandler(this.ChangeGraph);
     this.mouseAreaControl.SVGDocument.SelectCollection.OnCollectionChangedEvent += new OnCollectionChangedEventHandler(this.ChangeSelect);
     this.mouseAreaControl.DefaultCursor = SpecialCursors.bezierCursor;
 }
Esempio n. 13
0
 // Methods
 public TextOperation(MouseArea mc)
 {
     this.currrentText = null;
     this.caretvisible = true;
     this.selectionstart = 0;
     this.selectionlength = 0;
     this.hmargin = 5;
     this.vmargin = 5;
     this.doc = null;
     this.activeText = null;
     this.sf = StringFormat.GenericTypographic;
     this.paint = Color.Black;
     this.stroke = Color.Black;
     this.font = new Font("Arial", 12f);
     this.caretChar = null;
     this.caretRect = RectangleF.Empty;
     this.startindex = 0;
     this.scale = 1f;
     this.scaleMatrix = new Matrix();
     this.mouseAreaControl = null;
     this.editmode = false;
     this.preText = null;
     this.recordanim = true;
     this.undostack = new UndoStack();
     this.enterUpdate = false;
     this.chars = new ArrayList(0x10);
     this.caretindex = 0;
     this.mouseAreaControl = mc;
     mc.Focus();
     this.caretthread = new Thread(new ThreadStart(this.CaretMethod));
     this.caretthread.IsBackground = true;
     this.caretthread.Start();
     this.mouseAreaControl.Cursor = Cursors.IBeam;
     this.mouseAreaControl.KeyPress += new KeyPressEventHandler(this.OnKeyPress);
     this.sf.LineAlignment = StringAlignment.Near;
 }
Esempio n. 14
0
        private void InitializeComponent()
        {
            ResourceManager resources = new ResourceManager(typeof (ItopVector.DrawArea.DrawArea));
            this.hScrollBar1 = new HScrollBar();
            this.label1 = new Label();
            this.vScrollBar1 = new VScrollBar();
            this.hRule = new Label();
            this.vRule = new Label();
            this.label2 = new Label();
            this.viewer = new Viewer();
            this.mouseAreaControl = new MouseArea();
            this.viewer.SuspendLayout();
            base.SuspendLayout();
            this.hScrollBar1.Anchor = AnchorStyles.Right | (AnchorStyles.Left | AnchorStyles.Bottom);
            this.hScrollBar1.Location = new Point(0, 360);
            this.hScrollBar1.Name = "hScrollBar1";
            this.hScrollBar1.Size = new Size(0x170, 0x10);
            this.hScrollBar1.TabIndex = 0;
            this.hScrollBar1.ValueChanged += new EventHandler(this.hScrollBar1_ValueChanged);
            this.label1.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.label1.BackColor = SystemColors.Control;
            this.label1.Location = new Point(0x170, 360);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x10, 0x10);
            this.label1.TabIndex = 1;
            this.vScrollBar1.Anchor = AnchorStyles.Right | (AnchorStyles.Bottom | AnchorStyles.Top);
            this.vScrollBar1.Location = new Point(0x170, 0);
            this.vScrollBar1.Name = "vScrollBar1";
            this.vScrollBar1.Size = new Size(0x10, 360);
            this.vScrollBar1.TabIndex = 2;
            this.vScrollBar1.ValueChanged += new EventHandler(this.vScrollBar1_ValueChanged);
            this.hRule.Anchor = AnchorStyles.Right | (AnchorStyles.Left | AnchorStyles.Top);
            this.hRule.BackColor = Color.White;
            this.hRule.Name = "hRule";
            this.hRule.Size = new Size(0x170, 16);
            this.hRule.TabIndex = 3;
            this.hRule.Paint += new PaintEventHandler(this.hRule_Paint);
            this.hRule.MouseUp += new MouseEventHandler(this.hRule_MouseUp);
            this.hRule.MouseMove += new MouseEventHandler(this.hRule_MouseMove);
            this.vRule.Anchor = AnchorStyles.Left | (AnchorStyles.Bottom | AnchorStyles.Top);
            this.vRule.BackColor = Color.White;
            this.vRule.Name = "vRule";
            this.vRule.Size = new Size(16, 360);
            this.vRule.TabIndex = 4;
            this.vRule.Paint += new PaintEventHandler(this.vRule_Paint);
            this.vRule.MouseUp += new MouseEventHandler(this.hRule_MouseUp);
            this.vRule.MouseMove += new MouseEventHandler(this.hRule_MouseMove);
            this.label2.BackColor = Color.White;
            this.label2.Name = "label2";
            this.label2.Size = new Size(16, 16);
            this.label2.TabIndex = 5;
            this.label2.Paint += new PaintEventHandler(this.label2_Paint);
            this.viewer.AllowDrop = true;
            this.viewer.Anchor = AnchorStyles.Right | (AnchorStyles.Left | (AnchorStyles.Bottom | AnchorStyles.Top));
            this.viewer.BackColor = Color.Transparent;

            this.viewer.Controls.AddRange(new Control[1] {this.mouseAreaControl});
            this.viewer.Name = "viewer";
            this.viewer.Size = new Size(0x170, 360);
            this.viewer.SVGDocument = null;
            this.viewer.TabIndex = 6;
            this.viewer.Text = "viewer1";
            this.mouseAreaControl.AllowDrop = true;
            this.mouseAreaControl.BackColor = Color.Transparent;
            this.mouseAreaControl.CenterPoint = (PointF) resources.GetObject("mouseAreaControl.CenterPoint");
            this.mouseAreaControl.CurrentOperation = ToolOperation.None;
            this.mouseAreaControl.DefaultCursor = Cursors.Default;
            this.mouseAreaControl.Dock = DockStyle.Fill;
            this.mouseAreaControl.Name = "mouseAreaControl";
            //			this.mouseAreaControl.PicturePanel = null;
            this.mouseAreaControl.ShiftDown = false;
            this.mouseAreaControl.Size = new Size(0x170, 360);
            this.mouseAreaControl.TabIndex = 0;
            //			this.BackColor = Color.LightGray;
            this.BackColor = Color.FromArgb(144,153,174);
            Control[] controlArray2 = new Control[7] {this.vScrollBar1, this.label1, this.hScrollBar1, this.label2, this.vRule, this.hRule, this.viewer};
            base.Controls.AddRange(controlArray2);
            base.Name = "DrawArea";
            base.Size = new Size(0x180, 0x178);
            this.viewer.ResumeLayout(false);
            base.ResumeLayout(false);
        }
Esempio n. 15
0
 public BezierOperation(MouseArea mc, IPath path)
 {
     this.mouseAreaControl = null;
     this.currentGraph = null;
     this.revertMatrix = new Matrix();
     this.startPoint = PointF.Empty;
     this.currentOperate = BezierOperate.Draw;
     this.activePoints = new PointInfoCollection();
     this.editPath = new GraphicsPath();
     this.preInfo = null;
     this.reversePath = new GraphicsPath();
     this.editpath = new GraphicsPath();
     this.preDrawInfo = null;
     this.starttrend = PointF.Empty;
     this.endtrend = PointF.Empty;
     this.addInfo = null;
     this.moveinfo = null;
     this.movePoint = PointF.Empty;
     this.currentinfo = null;
     this.SubpathList = new Hashtable(0x10);
     this.oldstr = string.Empty;
     this.attributename = string.Empty;
     this.showcontrol = true;
     this.activeindex = new int[0];
     this.oldindex = -1;
     this.centerPoint = PointF.Empty;
     this.incenter = false;
     this.tooltips = new Hashtable(0x10);
     this.centerPoint = PointF.Empty;
     this.mouseAreaControl = mc;
     this.win32 = mc.win32;
     this.currentGraph = path;
     this.mouseAreaControl.Invalidate();
     if (path is IGraph)
     {
         this.revertMatrix = ((IGraph) path).GraphTransform.Matrix.Clone();
     }
     else if (path is MotionAnimate)
     {
         SvgElement element1 = ((MotionAnimate) path).RefElement;
         if (element1 is IGraph)
         {
             Matrix matrix1 = ((IGraph) element1).Transform.Matrix.Clone();
             this.revertMatrix = ((IGraph) element1).GraphTransform.Matrix.Clone();
             matrix1.Invert();
             this.revertMatrix.Multiply(matrix1);
             Matrix matrix2 = new Matrix();
             matrix2 = AnimFunc.GetMatrixForTime((IGraph) element1, this.mouseAreaControl.SVGDocument.ControlTime, ((MotionAnimate) this.currentGraph).Begin);
             this.revertMatrix.Multiply(matrix2);
             this.centerPoint = this.PointToView(this.mouseAreaControl.CenterPoint);
             object obj1 = ((MotionAnimate) path).GetAnimateResult((float) this.mouseAreaControl.SVGDocument.ControlTime, DomType.SvgMatrix);
             if (obj1 is Matrix)
             {
                 Matrix matrix3 = (Matrix) obj1;
                 this.centerPoint.X -= matrix3.OffsetX;
                 this.centerPoint.Y -= matrix3.OffsetY;
             }
             this.revertMatrix.Translate(this.centerPoint.X, this.centerPoint.Y);
         }
     }
     if (path is GraphPath)
     {
         this.attributename = "d";
     }
     else if (path is MotionAnimate)
     {
         this.attributename = "path";
     }
     this.mouseAreaControl.DefaultCursor = SpecialCursors.bezierCursor;
 }
Esempio n. 16
0
        // Methods
        public DrawArea()
        {
            this.components = null;
            this.mouseAreaControl = null;
            this.pageSetting = new PageSettings();
            this.drawMode = DrawModeType.ScreenImage;
            this.virtualLeft = 0f;
            this.virtualTop = 0f;
            this.scale = 1f;
            this.coordTransform = new Matrix();
            this.viewSize = new SizeF(500f, 500f);
            this.showGrid = true;
            this.showRule = true;
            this.showGuides = false;
            this.lockGuides = false;
            this.gridSize = new SizeF(10f, 10f);
            this.firstload = true;
            this.operation = ToolOperation.None;

            this.centerPoint = PointF.Empty;
            this.oldpoint = Point.Empty;
            this.prepathchanged = false;
            this.preGraph = null;
            this.UpdateRule = true;
            this.RefLines = new ArrayList(0x10);
            this.SnapToGrid = false;
            this.SnapToGuides = false;
            this.PreTextSelect = new SvgElementCollection();
            this.InitializeComponent();
            this.viewer.drawArea = this;
            this.margin = Size.Round(this.viewer.margin);
            this.mouseAreaControl.Focus();
            this.mouseAreaControl.PicturePanel = this;
            this.mouseAreaControl.DragAndDrop+=new DragEventHandler(mouseAreaControl_DragDrop);
            this.FillBrush = new SolidColor(Color.White);
            this.stroke = new Stroke(new SolidColor(Color.Black));
            this.backColor = new SolidBrush(Color.White);
            this.RatTextStyle = new ItopVector.Struct.TextStyle("����", 12, false, false, false);
            base.MouseWheel += new MouseEventHandler(this.DealMouseWheel);
            addedElements=new SvgElementCollection();
            this.viewer.ViewChanged +=new ViewChangedEventHandler(viewer_ViewChanged);
            this.mouseAreaControl.BeforeDragDrop+=new DragEventHandler(DrawArea_BeforeDragDrop);
            this.mouseAreaControl.OnPolyLineBreak += new PolyLineBreakEventHandler(mouseAreaControl_OnPolyLineBreak);
            this.mouseAreaControl.OnAddElement += new AddSvgElementEventHandler(mouseAreaControl_OnAddElement);
            this.mouseAreaControl.MouseMove += new MouseEventHandler(mouseAreaControl_MouseMove);
            this.mouseAreaControl.MouseDown += new MouseEventHandler(mouseAreaControl_MouseDown);
            this.mouseAreaControl.MouseUp += new MouseEventHandler(mouseAreaControl_MouseUp);
            this.mouseAreaControl.OnElementMove += new ElementMoveEventHandler(mouseAreaControl_OnElementMove);

            //            base.SetStyle(ControlStyles.DoubleBuffer | (ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint), true);
        }
Esempio n. 17
0
 // Methods
 public FlipOperation(MouseArea mc)
 {
     this.mouseAreaControl = null;
     this.mouseAreaControl = mc;
     this.win32 = mc.win32;
 }
Esempio n. 18
0
 internal ViewOperation(MouseArea mousearea)
     : this()
 {
     this.mouseAreaControl = mousearea;
     this.win32 = mousearea.win32;
 }
Esempio n. 19
0
 // Methods
 internal SubOperation(MouseArea mc)
 {
     this.currentGraph = null;
     this.mouseAreaControl = null;
     this.mouseAreaControl = mc;
 }