Board underside display does not work if there's a Label or PCB Text component on the board

This commit is contained in:
Bane Stojkovic
2025-03-30 23:46:13 +02:00
parent baaeefdbab
commit 58e28a95fd
3 changed files with 41 additions and 36 deletions
@@ -26,23 +26,13 @@ import org.diylc.components.misc.Label;
import org.diylc.components.misc.PCBText;
import org.diylc.core.IDIYComponent;
public class TextTransformer implements IComponentTransformer {
public class TextTransformer extends SimpleComponentTransformer {
@Override
public boolean canRotate(IDIYComponent<?> component) {
return component.getClass().equals(Label.class) || component.getClass().equals(PCBText.class);
}
@Override
public boolean canMirror(IDIYComponent<?> component) {
return false;
}
@Override
public boolean mirroringChangesCircuit() {
return false;
}
@Override
public void rotate(IDIYComponent<?> component, Point2D center, int direction) {
AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2 * direction, center.getX(), center.getY());
@@ -76,9 +66,4 @@ public class TextTransformer implements IComponentTransformer {
snap.setOrientation(o);
}
}
@Override
public void mirror(IDIYComponent<?> component, Point2D center, int direction) {
throw new RuntimeException("Unexpected call to mirror() in LabelTransformer");
}
}