flush() method for the window.
- macOS 10.0–10.14Deprecated
If the window is buffered, disabling
flush() prevents drawing from being automatically flushed by the
display... methods from the window’s backing store to the screen. This method permits several views to be drawn before the results are shown to the user.
Flushing should be disabled only temporarily, while the window’s display is being updated. Each
disableFlushWindow message must be paired with a subsequent
enableFlushing() message. Invocations of these methods can be nested; flushing isn’t reenabled until the last
enableFlushing() message is sent.
Flushes the window’s offscreen buffer to the screen if the window is buffered and flushing is enabled.
Flushes the window’s offscreen buffer to the screen if flushing is enabled and if the last
flush() message had no effect because flushing was disabled.
func cacheImage(in: NSRect)
Stores the window’s raster image from a given rectangle expressed in the window’s base coordinate system.
Splices the window’s cached image rectangles, if any, back into its raster image (and buffer if it has one), undoing the effect of any drawing performed within those areas since they were established using