mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-13 02:32:09 +10:00
'Schaller Megaswitch' not rendered correctly when rotated for 90 or 270 degrees
This commit is contained in:
@@ -237,9 +237,9 @@ public class FreewayBlade extends AbstractAngledComponent<String> implements ISw
|
||||
|
||||
// Rotate if needed
|
||||
if (theta != 0) {
|
||||
// Skip the last two because terminals are already rotated
|
||||
// Skip the last one because terminals are already rotated
|
||||
AffineTransform rotation = AffineTransform.getRotateInstance(theta, x, y);
|
||||
for (int i = 0; i < body.length - 2; i++) {
|
||||
for (int i = 0; i < body.length - 1; i++) {
|
||||
Shape shape = body[i];
|
||||
Area area = (Area) shape;
|
||||
area.transform(rotation);
|
||||
|
||||
+2
-2
@@ -277,9 +277,9 @@ public class SchallerMegaSwitch extends AbstractAngledComponent<String> implemen
|
||||
|
||||
// Rotate if needed
|
||||
if (theta != 0) {
|
||||
// Skip the last two because terminals are already rotated
|
||||
// Skip the last one because terminals are already rotated
|
||||
AffineTransform rotation = AffineTransform.getRotateInstance(theta, x, y);
|
||||
for (int i = 0; i < body.length - 2; i++) {
|
||||
for (int i = 0; i < body.length - 1; i++) {
|
||||
Shape shape = body[i];
|
||||
Area area = (Area) shape;
|
||||
area.transform(rotation);
|
||||
|
||||
Reference in New Issue
Block a user