Implement XLIB scaling functionality.