It appears to me that TWBT draws a map assuming the map tiles are sized like text tiles, which might be the root cause of the announcement-centering issue and the getPanelLayout() issue. Drawing only the required tiles (rounding up) might help a smidge with FPS as well. lethosor's idea might also eliminate the need for modified plugins, reducing your workload each release.
Not quite. TWBT just calls the DF map rendering function, and that function uses window size in text tiles (because, well, DF doesn't have "text" or "map" tiles, so that's just df.global.gps.dimx/dimy values). In order to render the correct map size and position, TWBT temporarily adjusts these values to be window size in map tiles, renders map, and changes them back.
But when the game centres on an announcement location, it, again, uses window size in text tiles, while the map size is different, resulting in wrong centring. Since it happens inside DF code, there's not much we can do.
However, in some cases, for example, when you press a key to zoon to a unit, I, again, intercept that key, temporarily adjust window size to be the map size, pass the key to DF, and change it back. But this requires handling all cases separately (where possible at all). So if it doesn't centre properly in some cases, maybe I just need to add code for those cases.
On the other hand, if we're talking about DFHack code and map centring done in DFHack code, if any, then yes, doing what lethosor suggests will help.