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(); }
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(); }
/// <summary> /// Draws a <see cref="InvariantLinePrimitive"/>. Must be overridden and implemented. /// </summary> protected abstract void DrawInvariantLinePrimitive(InvariantLinePrimitive line);
/// <summary> /// Draws a <see cref="InvariantLinePrimitive"/>. /// </summary> protected override void DrawInvariantLinePrimitive(InvariantLinePrimitive line) { InternalDrawLinePrimitive(line); }
protected virtual void DrawInvariantLinePrimitive(InvariantLinePrimitive line) { GdiRenderer.DrawLinePrimitive(Surface.OverlayBuffer, _pen, line, Dpi); }
/// <summary> /// Draws a <see cref="InvariantLinePrimitive"/>. /// </summary> protected override void DrawInvariantLinePrimitive(InvariantLinePrimitive line) { DrawLinePrimitive(Surface.FinalBuffer, _pen, line, Dpi); }