I am in the process of maintaining a legacy application built in Java and am encountering an issue with objects drawn on the page as if they were drawn on a landscape page as opposed to portrait page. The page in question is drawn as a buffered image in the portrait orientation and most of the graphics to be drawn on the page are drawn as Java polygons and lines in the correct portrait orientation, these objects come from one database, and are drawn correctly. However the objects which come from the second database are drawn as if the page were in landscape orientation, which is subsequently incorrect, these objects are polygons created as Java paths from coordinates and then an area object is created from them and drawn.
I have tried creating a rotation transform for both 90 degrees and 270 degrees, converted to radians, and in both instances the objects in question are drawn off the page when rotated. The page occupies the positive x and negative y quadrant of a xy axis.
As an experiment I rotated the page in question back to landscape and the misaligned objects were now aligned correctly, with all the other objects. I continued down this path and rotated the page back to portrait orientation after the objects in question were drawn and they then rotated back to the portrait position and everything appeared correct, but when attempting to zoom in, the objects were not draw at all.
Is there some way I could create and apply a landscape to portrait transform to the areas of the objects in question for the given bounds of the page, and then have them move to the right position instead of having to rotate the page to match their orientation, I suspect that this way would also solve the zoom issue as well?
The page must be in the portrait orientation as a second page needs to be drawn next to it, in landscape orientation there is no space.
Thanks in advance