private void OnCloneComplete()
        {
            IList <IGraphic> lines = CollectionUtils.Select(base.Graphics,
                                                            delegate(IGraphic test) { return(test is InvariantLinePrimitive); });

            _left  = lines[0] as InvariantLinePrimitive;
            _right = lines[1] as InvariantLinePrimitive;

            Initialize();
        }
		private void OnCloneComplete()
		{
			IList<IGraphic> lines = CollectionUtils.Select(base.Graphics,
			                                               delegate(IGraphic test) { return test is InvariantLinePrimitive; });

			_left = lines[0] as InvariantLinePrimitive;
			_right = lines[1] as InvariantLinePrimitive;

			Initialize();
		}
        private void Initialize()
        {
            if (_left == null)
            {
                base.Graphics.Add(_left    = new InvariantLinePrimitive());
                _left.InvariantBottomRight = PointF.Empty;
            }

            if (_right == null)
            {
                base.Graphics.Add(_right    = new InvariantLinePrimitive());
                _right.InvariantBottomRight = PointF.Empty;
            }

            RecomputeArrow();
        }
		private void Initialize()
		{
			if (_left == null)
			{
				base.Graphics.Add(_left = new InvariantLinePrimitive());
				_left.InvariantBottomRight = PointF.Empty;
			}

			if (_right == null)
			{
				base.Graphics.Add(_right = new InvariantLinePrimitive());
				_right.InvariantBottomRight = PointF.Empty;
			}

			RecomputeArrow();
		}
Exemple #5
0
		/// <summary>
		/// Draws a <see cref="InvariantLinePrimitive"/>.  Must be overridden and implemented.
		/// </summary>
		protected abstract void DrawInvariantLinePrimitive(InvariantLinePrimitive line);
Exemple #6
0
		/// <summary>
		/// Draws a <see cref="InvariantLinePrimitive"/>.
		/// </summary>
		protected override void DrawInvariantLinePrimitive(InvariantLinePrimitive line)
		{
			InternalDrawLinePrimitive(line);
		}
Exemple #7
0
		/// <summary>
		/// Draws a <see cref="InvariantLinePrimitive"/>.
		/// </summary>
		protected override void DrawInvariantLinePrimitive(InvariantLinePrimitive line)
		{
			DrawLinePrimitive(Surface.FinalBuffer, _pen, line, Dpi);
		}
        private void Initialize()
        {
            if (_left == null)
            {
                Graphics.Add(_left = new InvariantLinePrimitive());
                _left.InvariantBottomRight = PointF.Empty;
            }

            if (_right == null)
            {
                Graphics.Add(_right = new InvariantLinePrimitive());
                _right.InvariantBottomRight = PointF.Empty;
            }

            if (_top == null)
            {
                Graphics.Add(_top = new InvariantLinePrimitive());
                _top.InvariantBottomRight = PointF.Empty;
            }

            if (_bottom == null)
            {
                Graphics.Add(_bottom = new InvariantLinePrimitive());
                _bottom.InvariantBottomRight = PointF.Empty;
            }

            RecomputeCrosshair();
        }