@@ -1255,68 +1255,84 @@ private GraphicsPath DrawPerspectiveCallout(
12551255 // Create paths of perspective
12561256 if ( anchorPoint . Y < rectanglePosition . Y )
12571257 {
1258- PointF [ ] points1 = new PointF [ 3 ] ;
1259- points1 [ 0 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ;
1260- points1 [ 1 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ;
1261- points1 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1258+ PointF [ ] points1 =
1259+ [
1260+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ,
1261+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ,
1262+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1263+ ] ;
12621264 perspectivePaths [ 0 ] . AddLines ( points1 ) ;
12631265 if ( anchorPoint . X < rectanglePosition . X )
12641266 {
1265- PointF [ ] points2 = new PointF [ 3 ] ;
1266- points2 [ 0 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ;
1267- points2 [ 1 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ;
1268- points2 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1267+ PointF [ ] points2 =
1268+ [
1269+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ,
1270+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ,
1271+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1272+ ] ;
12691273 perspectivePaths [ 1 ] . AddLines ( points2 ) ;
12701274 }
12711275 else if ( anchorPoint . X > rectanglePosition . Right )
12721276 {
1273- PointF [ ] points2 = new PointF [ 3 ] ;
1274- points2 [ 0 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ;
1275- points2 [ 1 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ;
1276- points2 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1277+ PointF [ ] points2 =
1278+ [
1279+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ,
1280+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ,
1281+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1282+ ] ;
12771283 perspectivePaths [ 1 ] . AddLines ( points2 ) ;
12781284 }
12791285 }
12801286 else if ( anchorPoint . Y > rectanglePosition . Bottom )
12811287 {
1282- PointF [ ] points1 = new PointF [ 3 ] ;
1283- points1 [ 0 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ;
1284- points1 [ 1 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ;
1285- points1 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1288+ PointF [ ] points1 =
1289+ [
1290+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ,
1291+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ,
1292+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1293+ ] ;
12861294 perspectivePaths [ 0 ] . AddLines ( points1 ) ;
12871295 if ( anchorPoint . X < rectanglePosition . X )
12881296 {
1289- PointF [ ] points2 = new PointF [ 3 ] ;
1290- points2 [ 0 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ;
1291- points2 [ 1 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ;
1292- points2 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1297+ PointF [ ] points2 =
1298+ [
1299+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ,
1300+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ,
1301+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1302+ ] ;
12931303 perspectivePaths [ 1 ] . AddLines ( points2 ) ;
12941304 }
12951305 else if ( anchorPoint . X > rectanglePosition . Right )
12961306 {
1297- PointF [ ] points2 = new PointF [ 3 ] ;
1298- points2 [ 0 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ;
1299- points2 [ 1 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ;
1300- points2 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1307+ PointF [ ] points2 =
1308+ [
1309+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ,
1310+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ,
1311+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1312+ ] ;
13011313 perspectivePaths [ 1 ] . AddLines ( points2 ) ;
13021314 }
13031315 }
13041316 else
13051317 {
13061318 if ( anchorPoint . X < rectanglePosition . X )
13071319 {
1308- PointF [ ] points2 = new PointF [ 3 ] ;
1309- points2 [ 0 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ;
1310- points2 [ 1 ] = new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ;
1311- points2 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1320+ PointF [ ] points2 =
1321+ [
1322+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Bottom ) ,
1323+ new PointF ( rectanglePositionAbs . X , rectanglePositionAbs . Y ) ,
1324+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1325+ ] ;
13121326 perspectivePaths [ 1 ] . AddLines ( points2 ) ;
13131327 }
13141328 else if ( anchorPoint . X > rectanglePosition . Right )
13151329 {
1316- PointF [ ] points2 = new PointF [ 3 ] ;
1317- points2 [ 0 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ;
1318- points2 [ 1 ] = new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ;
1319- points2 [ 2 ] = new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ;
1330+ PointF [ ] points2 =
1331+ [
1332+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Bottom ) ,
1333+ new PointF ( rectanglePositionAbs . Right , rectanglePositionAbs . Y ) ,
1334+ new PointF ( anchorPointAbs . X , anchorPointAbs . Y ) ,
1335+ ] ;
13201336 perspectivePaths [ 1 ] . AddLines ( points2 ) ;
13211337 }
13221338 }
0 commit comments