[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

This section shows you how to use the Amiga drawing routines. All of these
routines work either on their own or along with the windowing system and
layers library.  For details about using the layers and windows, see the
chapters on "Layers Library" and "Intuition Windows".

    Use WaitBlit().
    The graphics library rendering and data movement routines generally
    wait to get access to the blitter, start their blit, and then exit.
    Therefore, you must WaitBlit() after a graphics rendering or data
    movement call if you intend to immediately deallocate, examine, or
    perform order-dependent processor operations on the memory used in
    the call.

As you read this section, keep in mind that to use the drawing routines,
you need to pass them a pointer to a RastPort.  You can define the
RastPort directly, as shown in the sample program segments in preceding
sections, or you can get a RastPort from your Window structure using code
like the following:

    struct Window *window;
    struct RastPort *rastPort;

    window = OpenWindow(&newWindow);  /*  You could use OpenWindowTags() */
    if (window)
        rastPort = window->RPort;

You can also get the RastPort from the Layer structure, if you are not
using Intuition.

 Drawing Individual Pixels 
 Reading Individual Pixels 
 Drawing Ellipses and Circles 
 Drawing Lines 
 Drawing Patterned Lines 
 Drawing Multiple Lines with a Single Command 
 Area-fill Operations 
 Ellipse and Circle-fill Operations 
 Flood-fill Operations 
 Rectangle-fill Operations