Fill the window with user-provided pattern.