- Timestamp:
- Nov 30, 2020, 11:47:17 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/1.1.0/UEngine.pas
r68 r72 1466 1466 case Shape of 1467 1467 ssSquare: begin 1468 Points := [ 1469 Point(Position.X - Size div 2, Position.Y - Size div 2), 1470 Point(Position.X + Size div 2, Position.Y - Size div 2), 1471 Point(Position.X + Size div 2, Position.Y + Size div 2), 1472 Point(Position.X - Size div 2, Position.Y + Size div 2) 1473 ]; 1468 SetLength(Points, 4); 1469 Points[0] := Point(Position.X - Size div 2, Position.Y - Size div 2); 1470 Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 2); 1471 Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 2); 1472 Points[3] := Point(Position.X - Size div 2, Position.Y + Size div 2); 1474 1473 Points := RotatePoints(Position, Points, Angle); 1475 1474 Canvas.Polygon(Points); … … 1479 1478 Position.X + Size div 2, Position.Y + Size div 2); 1480 1479 ssTriangle: begin 1481 Points := [ 1482 Point(Position.X, Position.Y - Size div 2), 1483 Point(Position.X + Size div 2, Position.Y + Size div 2), 1484 Point(Position.X - Size div 2, Position.Y + Size div 2) 1485 ]; 1480 SetLength(Points, 3); 1481 Points[0] := Point(Position.X, Position.Y - Size div 2); 1482 Points[1] := Point(Position.X + Size div 2, Position.Y + Size div 2); 1483 Points[2] := Point(Position.X - Size div 2, Position.Y + Size div 2); 1486 1484 Points := RotatePoints(Position, Points, Angle); 1487 1485 Canvas.Polygon(Points); … … 1502 1500 end; 1503 1501 ssPlus: begin 1504 Points := [ 1505 Point(Position.X + Size div 6, Position.Y - Size div 6), 1506 Point(Position.X + Size div 2, Position.Y - Size div 6), 1507 Point(Position.X + Size div 2, Position.Y + Size div 6), 1508 Point(Position.X + Size div 6, Position.Y + Size div 6), 1509 Point(Position.X + Size div 6, Position.Y + Size div 2), 1510 Point(Position.X - Size div 6, Position.Y + Size div 2), 1511 Point(Position.X - Size div 6, Position.Y + Size div 6), 1512 Point(Position.X - Size div 2, Position.Y + Size div 6), 1513 Point(Position.X - Size div 2, Position.Y - Size div 6), 1514 Point(Position.X - Size div 6, Position.Y - Size div 6), 1515 Point(Position.X - Size div 6, Position.Y - Size div 2), 1516 Point(Position.X + Size div 6, Position.Y - Size div 2) 1517 ]; 1502 SetLength(Points, 12); 1503 Points[0] := Point(Position.X + Size div 6, Position.Y - Size div 6); 1504 Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 6); 1505 Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 6); 1506 Points[3] := Point(Position.X + Size div 6, Position.Y + Size div 6); 1507 Points[4] := Point(Position.X + Size div 6, Position.Y + Size div 2); 1508 Points[5] := Point(Position.X - Size div 6, Position.Y + Size div 2); 1509 Points[6] := Point(Position.X - Size div 6, Position.Y + Size div 6); 1510 Points[7] := Point(Position.X - Size div 2, Position.Y + Size div 6); 1511 Points[8] := Point(Position.X - Size div 2, Position.Y - Size div 6); 1512 Points[9] := Point(Position.X - Size div 6, Position.Y - Size div 6); 1513 Points[10] := Point(Position.X - Size div 6, Position.Y - Size div 2); 1514 Points[11] := Point(Position.X + Size div 6, Position.Y - Size div 2); 1518 1515 Points := RotatePoints(Position, Points, Angle); 1519 1516 Canvas.Polygon(Points); … … 1540 1537 end; 1541 1538 ssDiamond: begin 1542 Points := [ 1543 Point(Position.X, Position.Y - Size div 2), 1544 Point(Position.X + Size div 2, Position.Y), 1545 Point(Position.X, Position.Y + Size div 2), 1546 Point(Position.X - Size div 2, Position.Y) 1547 ]; 1539 SetLength(Points, 4); 1540 Points[0] := Point(Position.X, Position.Y - Size div 2); 1541 Points[1] := Point(Position.X + Size div 2, Position.Y); 1542 Points[2] := Point(Position.X, Position.Y + Size div 2); 1543 Points[3] := Point(Position.X - Size div 2, Position.Y); 1548 1544 Points := RotatePoints(Position, Points, Angle); 1549 1545 Canvas.Polygon(Points); 1550 1546 end; 1551 1547 ssCross: begin 1552 Points := [ 1553 Point(Position.X + Size div 6, Position.Y - Size div 6), 1554 Point(Position.X + Size div 2, Position.Y - Size div 6), 1555 Point(Position.X + Size div 2, Position.Y + Size div 6), 1556 Point(Position.X + Size div 6, Position.Y + Size div 6), 1557 Point(Position.X + Size div 6, Position.Y + Size div 2), 1558 Point(Position.X - Size div 6, Position.Y + Size div 2), 1559 Point(Position.X - Size div 6, Position.Y + Size div 6), 1560 Point(Position.X - Size div 2, Position.Y + Size div 6), 1561 Point(Position.X - Size div 2, Position.Y - Size div 6), 1562 Point(Position.X - Size div 6, Position.Y - Size div 6), 1563 Point(Position.X - Size div 6, Position.Y - Size div 2), 1564 Point(Position.X + Size div 6, Position.Y - Size div 2) 1565 ]; 1548 SetLength(Points, 12); 1549 Points[0] := Point(Position.X + Size div 6, Position.Y - Size div 6); 1550 Points[1] := Point(Position.X + Size div 2, Position.Y - Size div 6); 1551 Points[2] := Point(Position.X + Size div 2, Position.Y + Size div 6); 1552 Points[3] := Point(Position.X + Size div 6, Position.Y + Size div 6); 1553 Points[4] := Point(Position.X + Size div 6, Position.Y + Size div 2); 1554 Points[5] := Point(Position.X - Size div 6, Position.Y + Size div 2); 1555 Points[6] := Point(Position.X - Size div 6, Position.Y + Size div 6); 1556 Points[7] := Point(Position.X - Size div 2, Position.Y + Size div 6); 1557 Points[8] := Point(Position.X - Size div 2, Position.Y - Size div 6); 1558 Points[9] := Point(Position.X - Size div 6, Position.Y - Size div 6); 1559 Points[10] := Point(Position.X - Size div 6, Position.Y - Size div 2); 1560 Points[11] := Point(Position.X + Size div 6, Position.Y - Size div 2); 1566 1561 Points := RotatePoints(Position, Points, Angle + Pi / 4); 1567 1562 Canvas.Polygon(Points);
Note:
See TracChangeset
for help on using the changeset viewer.