localRenderInfo.setImageWidth(2 * pRenderInfo.getImageWidth());
localRenderInfo.setImageHeight(leftRenders.length * pRenderInfo.getImageHeight());
mergedRender.init(localRenderInfo);
SimpleImage mergedImg = mergedRender.getImage();
ComposeTransformer composeTransformer = new ComposeTransformer();
composeTransformer.setHAlign(HAlignment.OFF);
composeTransformer.setVAlign(VAlignment.OFF);
int yOff = 0;
for (int i = 0; i < leftRenders.length; i++) {
composeTransformer.setLeft(0);
composeTransformer.setTop(yOff);
composeTransformer.setForegroundImage(leftRenders[i].getImage());
composeTransformer.transformImage(mergedImg);
yOff += pRenderInfo.getImageHeight();
}
yOff = 0;
for (int i = 0; i < rightRenders.length; i++) {
composeTransformer.setLeft(pRenderInfo.getImageWidth());
composeTransformer.setTop(yOff);
composeTransformer.setForegroundImage(rightRenders[i].getImage());
composeTransformer.transformImage(mergedImg);
yOff += pRenderInfo.getImageHeight();
}
return mergedRender;
}