[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

Applications can call functions in both the graphics library and the
Intuition library to render images, lines, text and other graphic elements
in windows.  The graphics library provides primitive operations such as
area fill, line drawing, text and animation.

The number of colors and the palette available in a window are defined by
the screen in which the window opens.  Applications should never change
the palette of a screen unless the screen is a custom screen created by
the application.

Graphics rendered into the window should respect the drawing pens defined
for the screen.  See the section on "drawinfo and the 3d look" in the
"Intuition Screens" chapter for more information.

Default window fonts come from one of two places, depending on the screen
on which the window opens.  The window title font is always taken from the
screen font.  If the screen is opened with a font specified, either by
specifying the tag sa_font or the variable newscreen.font, then
window.rport->font is taken from the screen's font.  otherwise, the
window's rastport's font is taken from gfxbase->defaultfont. this
information is available to the application if it opened the screen.

If the application did not open the screen, it has no way of knowing which
font has been used for the window.  Applications that require to know the
window's font before the window is open must explicitly set the font
(using setfont()) for that window after opening it.  in this case, the
application may use any font it desires.  It is recommended that
applications use the screen's font if they support proportional fonts, and
gfxbase->defaultfont otherwise, as these fonts are generally the user's
preference.

Intuition also provides a minimal high level interface to some of the
functions in the Graphics library.  This includes calls to draw lines,
text and images.  See the chapter entitled
"intuition images, line drawing and text," for more information about
using Intuition to render graphics.