Exemple #1
0
        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();
        }
Exemple #2
0
        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;
            _top    = lines[2] as InvariantLinePrimitive;
            _bottom = lines[3] as InvariantLinePrimitive;

            Initialize();
        }
Exemple #3
0
 /// <summary>
 /// Draws a <see cref="InvariantLinePrimitive"/>.  Must be overridden and implemented.
 /// </summary>
 protected abstract void DrawInvariantLinePrimitive(InvariantLinePrimitive line);
Exemple #4
0
 /// <summary>
 /// Draws a <see cref="InvariantLinePrimitive"/>.
 /// </summary>
 protected override void DrawInvariantLinePrimitive(InvariantLinePrimitive line)
 {
     InternalDrawLinePrimitive(line);
 }
Exemple #5
0
 protected virtual void DrawInvariantLinePrimitive(InvariantLinePrimitive line)
 {
     GdiRenderer.DrawLinePrimitive(Surface.OverlayBuffer, _pen, line, Dpi);
 }
Exemple #6
0
 /// <summary>
 /// Draws a <see cref="InvariantLinePrimitive"/>.
 /// </summary>
 protected override void DrawInvariantLinePrimitive(InvariantLinePrimitive line)
 {
     DrawLinePrimitive(Surface.FinalBuffer, _pen, line, Dpi);
 }