@@ -332,7 +332,7 @@ private GraphicsPath GetArrowPath(
332
332
// Calculate arrow length
333
333
float deltaX = secondPoint . X - firstPoint . X ;
334
334
float deltaY = secondPoint . Y - firstPoint . Y ;
335
- float arrowLength = ( float ) Math . Sqrt ( deltaX * deltaX + deltaY * deltaY ) ;
335
+ float arrowLength = MathF . Sqrt ( deltaX * deltaX + deltaY * deltaY ) ;
336
336
337
337
// Create unrotated graphics path for the arrow started at the annotation location
338
338
// and going to the right for the length of the rotated arrow.
@@ -343,40 +343,40 @@ private GraphicsPath GetArrowPath(
343
343
if ( this . ArrowStyle == ArrowStyle . Simple )
344
344
{
345
345
points = [
346
- firstPoint ,
347
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
348
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
349
- new PointF ( firstPoint . X + arrowLength , firstPoint . Y - this . ArrowSize ) ,
350
- new PointF ( firstPoint . X + arrowLength , firstPoint . Y + this . ArrowSize ) ,
351
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
352
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ] ;
346
+ firstPoint ,
347
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
348
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
349
+ new PointF ( firstPoint . X + arrowLength , firstPoint . Y - this . ArrowSize ) ,
350
+ new PointF ( firstPoint . X + arrowLength , firstPoint . Y + this . ArrowSize ) ,
351
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
352
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ] ;
353
353
}
354
354
else if ( this . ArrowStyle == ArrowStyle . DoubleArrow )
355
355
{
356
356
points = [
357
- firstPoint ,
358
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
359
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
360
- new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
361
- new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
362
- new PointF ( firstPoint . X + arrowLength , firstPoint . Y ) ,
363
- new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ,
364
- new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
365
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
366
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ] ;
357
+ firstPoint ,
358
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
359
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
360
+ new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
361
+ new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
362
+ new PointF ( firstPoint . X + arrowLength , firstPoint . Y ) ,
363
+ new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ,
364
+ new PointF ( firstPoint . X + arrowLength - this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
365
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
366
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ] ;
367
367
}
368
368
else if ( this . ArrowStyle == ArrowStyle . Tailed )
369
369
{
370
370
float tailRatio = 2.1f ;
371
371
points = [
372
- firstPoint ,
373
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
374
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
375
- new PointF ( firstPoint . X + arrowLength , firstPoint . Y - this . ArrowSize * tailRatio ) ,
376
- new PointF ( firstPoint . X + arrowLength - this . ArrowSize * tailRatio , firstPoint . Y ) ,
377
- new PointF ( firstPoint . X + arrowLength , firstPoint . Y + this . ArrowSize * tailRatio ) ,
378
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
379
- new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ] ;
372
+ firstPoint ,
373
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize * pointerRatio ) ,
374
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y - this . ArrowSize ) ,
375
+ new PointF ( firstPoint . X + arrowLength , firstPoint . Y - this . ArrowSize * tailRatio ) ,
376
+ new PointF ( firstPoint . X + arrowLength - this . ArrowSize * tailRatio , firstPoint . Y ) ,
377
+ new PointF ( firstPoint . X + arrowLength , firstPoint . Y + this . ArrowSize * tailRatio ) ,
378
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize ) ,
379
+ new PointF ( firstPoint . X + this . ArrowSize * pointerRatio , firstPoint . Y + this . ArrowSize * pointerRatio ) ] ;
380
380
}
381
381
else
382
382
{
@@ -387,7 +387,7 @@ private GraphicsPath GetArrowPath(
387
387
path . CloseAllFigures ( ) ;
388
388
389
389
// Calculate arrow angle
390
- float angle = ( float ) ( Math . Atan ( deltaY / deltaX ) * 180f / Math . PI ) ;
390
+ float angle = MathF . Atan ( deltaY / deltaX ) * 180f / MathF . PI ;
391
391
if ( deltaX < 0 )
392
392
{
393
393
angle += 180f ;
0 commit comments