@@ -1255,68 +1255,84 @@ private GraphicsPath DrawPerspectiveCallout(
1255
1255
// Create paths of perspective
1256
1256
if ( anchorPoint . Y < rectanglePosition . Y )
1257
1257
{
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
+ ] ;
1262
1264
perspectivePaths [ 0 ] . AddLines ( points1 ) ;
1263
1265
if ( anchorPoint . X < rectanglePosition . X )
1264
1266
{
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
+ ] ;
1269
1273
perspectivePaths [ 1 ] . AddLines ( points2 ) ;
1270
1274
}
1271
1275
else if ( anchorPoint . X > rectanglePosition . Right )
1272
1276
{
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
+ ] ;
1277
1283
perspectivePaths [ 1 ] . AddLines ( points2 ) ;
1278
1284
}
1279
1285
}
1280
1286
else if ( anchorPoint . Y > rectanglePosition . Bottom )
1281
1287
{
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
+ ] ;
1286
1294
perspectivePaths [ 0 ] . AddLines ( points1 ) ;
1287
1295
if ( anchorPoint . X < rectanglePosition . X )
1288
1296
{
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
+ ] ;
1293
1303
perspectivePaths [ 1 ] . AddLines ( points2 ) ;
1294
1304
}
1295
1305
else if ( anchorPoint . X > rectanglePosition . Right )
1296
1306
{
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
+ ] ;
1301
1313
perspectivePaths [ 1 ] . AddLines ( points2 ) ;
1302
1314
}
1303
1315
}
1304
1316
else
1305
1317
{
1306
1318
if ( anchorPoint . X < rectanglePosition . X )
1307
1319
{
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
+ ] ;
1312
1326
perspectivePaths [ 1 ] . AddLines ( points2 ) ;
1313
1327
}
1314
1328
else if ( anchorPoint . X > rectanglePosition . Right )
1315
1329
{
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
+ ] ;
1320
1336
perspectivePaths [ 1 ] . AddLines ( points2 ) ;
1321
1337
}
1322
1338
}
0 commit comments