To carry the example further, the bitmap in the previous example could be used to create a stipple drawing pattern. The pattern (a brick pattern) is created as a bitmap. This bitmap is set as the stipple pattern in a graphics context using the setStipple: method. The fill style, FillOpaqueStippled, and the stipple origin offsets (x: 1 y: 2) are also set by sending the appropriate messages to the graphics context. The graphics context is then used to draw a filled rectangle.
|