mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Board underside display does not work if there's a Label or PCB Text component on the board
This commit is contained in:
+1
-16
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user