mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
When pasting a group of components that contain at least one "PCB Text"
instance, some of the other components get rendered mirrored while position the pasted components
This commit is contained in:
Binary file not shown.
@@ -116,14 +116,18 @@ public class PCBText extends AbstractComponent<Void> {
|
||||
case _270:
|
||||
g2d.rotate(Math.PI * 3 / 2, point.x, point.y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AffineTransform oldTx = g2d.getTransform();
|
||||
|
||||
// Flip horizontally
|
||||
AffineTransform tx = AffineTransform.getScaleInstance(-1, 1);
|
||||
tx.translate(-2 * x - textWidth, 0);
|
||||
g2d.transform(tx);
|
||||
|
||||
g2d.drawString(text, x, y);
|
||||
g2d.drawString(text, x, y);
|
||||
|
||||
g2d.setTransform(oldTx);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user