Point orig = new Point(imageBounds.x, imageBounds.y);
Dimension size = new Dimension(imageBounds.width, imageBounds.height);
os.writeTag(new SetMapMode(MM_ANISOTROPIC));
os.writeTag(new SetWindowOrgEx(orig));
os.writeTag(new SetWindowExtEx(size));
os.writeTag(new SetViewportOrgEx(orig));
os.writeTag(new SetViewportExtEx(size));
os.writeTag(new SetTextAlign(TA_BASELINE));
os.writeTag(new SetTextColor(getColor()));
os.writeTag(new SetPolyFillMode(EMFConstants.WINDING));