AtomSymbol { AtomSymbol resize(double scaleX, double scaleY) { Point2D center = element.getCenter(); AffineTransform transform = new AffineTransform(); transform.translate(center.getX(), center.getY()); transform.scale(scaleX, scaleY); transform.translate(-center.getX(), -center.getY()); return transform(transform); } AtomSymbol(TextOutline element, List<TextOutline> adjuncts); private  AtomSymbol(TextOutline element, List<TextOutline> adjuncts, List<TextOutline> annotationAdjuncts,
            SymbolAlignment alignment, ConvexHull hull);   }
@Test public void testResize() throws Exception { TextOutline outline = new TextOutline("Cl", font); AtomSymbol symbol = new AtomSymbol(outline, Collections.<TextOutline> emptyList()); AtomSymbol transformed = symbol.resize(2, 2); Rectangle2D orgBounds = outline.getBounds(); Rectangle2D newBounds = transformed.getOutlines().get(0).getBounds2D(); assertThat(newBounds.getX(), closeTo(orgBounds.getX() - orgBounds.getWidth() / 2, 0.01)); assertThat(newBounds.getY(), closeTo(orgBounds.getY() - orgBounds.getHeight() / 2, 0.01)); assertThat(newBounds.getMaxX(), closeTo(orgBounds.getMaxX() + orgBounds.getWidth() / 2, 0.01)); assertThat(newBounds.getMaxY(), closeTo(orgBounds.getMaxY() + orgBounds.getHeight() / 2, 0.01)); }