The size is $window(@window) and use the .x .y .dx .dy properties depending on what you need. Divide by half. Then, for text, subtact half the $width() of the font/text/size so that you are centered. For a picture, subtract half the width of the picture. For height, do the same thing as width. Use $height() for the font/text/size.