QuickDraw: How It Does Pattern Alignment



I need to know how QuickDraw aligns its patterns when it's drawing them. I'm
using off-screen bitmaps to get patterns that always start in the same place,
but a less memory-intensive solution would be nice. Is there a way to do this?

QuickDraw aligns patterns relative to the origin of the current GrafPort, which
is usually a window. The origin of a window is the upper lefthand corner of
the window. This causes a pattern to "shift" within a pattern-filled rectangle
if that rectangle is placed in different locations within a window. The method
of drawing a filled shape in an off-screen bitmap and then placing it in the
current window is an acceptable method for forcing a pattern's placement within
that filled shape.


Published Date: Feb 18, 2012