Skip to content

Commit

Permalink
Cleanup code in WinForms Data Visualization (#6)
Browse files Browse the repository at this point in the history
Refactoring and cleanup. Thanks @paul1956!
  • Loading branch information
paul1956 authored Oct 31, 2022
1 parent 41adbd5 commit 22e89b9
Show file tree
Hide file tree
Showing 97 changed files with 19,972 additions and 20,785 deletions.
379 changes: 180 additions & 199 deletions src/System.Windows.Forms.DataVisualization/Annotation/AnnotationBase.cs

Large diffs are not rendered by default.

728 changes: 355 additions & 373 deletions src/System.Windows.Forms.DataVisualization/Annotation/ArrowAnnotation.cs

Large diffs are not rendered by default.

3,281 changes: 1,636 additions & 1,645 deletions src/System.Windows.Forms.DataVisualization/Annotation/CalloutAnnotation.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -854,12 +854,9 @@ override internal void Paint(Chart chart, ChartGraphics graphics)
if( (this.Common.ProcessModePaint && this.IsSelected) ||
this.Common.ProcessModeRegions )
{
// Get annotation position in relative coordinates
PointF firstPoint = PointF.Empty;
PointF anchorPoint = PointF.Empty;
SizeF size = SizeF.Empty;
GetRelativePosition(out firstPoint, out size, out anchorPoint);
PointF secondPoint = new PointF(firstPoint.X + size.Width, firstPoint.Y + size.Height);
// Get annotation position in relative coordinates
GetRelativePosition(out PointF firstPoint, out SizeF size, out PointF anchorPoint);
PointF secondPoint = new PointF(firstPoint.X + size.Width, firstPoint.Y + size.Height);

// Create selection rectangle
RectangleF selectionRect = new RectangleF(firstPoint, new SizeF(secondPoint.X - firstPoint.X, secondPoint.Y - firstPoint.Y));
Expand Down
Loading

0 comments on commit 22e89b9

Please sign in to comment.