/// <summary> /// Fires the <see cref="Graphic.Drawing"/> event. Should be called by an <see cref="IRenderer"/> /// for each object just before it is drawn/rendered, hence the reason it is public. /// </summary> public override void OnDrawing() { base.CoordinateSystem = CoordinateSystem.Destination; _horizontalScale.CoordinateSystem = CoordinateSystem.Destination; _verticalScale.CoordinateSystem = CoordinateSystem.Destination; try { Rectangle hScaleBounds = ComputeScaleBounds(base.ParentPresentationImage, 0.10f, 0.05f); _horizontalScale.SetEndPoints(new PointF(hScaleBounds.Left, hScaleBounds.Bottom), new SizeF(hScaleBounds.Width, 0)); _horizontalScale.Visible = true; Rectangle vScaleBounds = ComputeScaleBounds(base.ParentPresentationImage, 0.05f, 0.10f); _verticalScale.SetEndPoints(new PointF(vScaleBounds.Right, vScaleBounds.Top), new SizeF(0, vScaleBounds.Height)); _verticalScale.Visible = true; } finally { base.ResetCoordinateSystem(); _horizontalScale.ResetCoordinateSystem(); _verticalScale.ResetCoordinateSystem(); } base.OnDrawing(); }