if (!rtlImages.isEmpty()) {
for (LocalizedImage rtlImage : rtlImages) {
// Create a transformation to mirror about the Y-axis and translate
AffineTransform tx = new AffineTransform();
ImageRect imageRect = images.get(rtlImage);
tx.setTransform(-1, 0, 0, 1, imageRect.getWidth(), 0);
imageRect.setTransform(tx);
}
URL rtlContents =
renderToTempPngFile(logger, builder, new ImageBundleBuilder.IdentityArranger());
assert rtlContents != null;
rtlContentsUrlExpression = context.deploy(rtlContents, MIME_TYPE_IMAGE_PNG, false);