next up previous contents index
Next: Rastering Functions Up: The X11-Interface Previous: Why a Special X11-Interface?   Contents   Index

Initialization of the X11-Interface

There are a few things t1lib must know in order to be able to do its job properly. These parameters are defined by a functioncall to

int T1_SetX11Params( Display *display, Visual *visual,
                     unsigned int depth, Colormap colormap)

to 0pt display is the pointer to the structure of the display the application is connected to. It is once specified here because this avoids the need of repeatedly having to specify this pointer.

visual is the pointer to the structure of the visual on which t1lib should create the XImages that will be transferred to the X server when using antialiasing. In most cases it should be safe to specify DefaultVisual(...).

The depth-argument specifies the depth that t1lib will use when creating antialiased pixmaps. It is thus identical to the value bpp supplied to T1_AASetBitsPerPixel() (see [*]). The depth must be one of the depth supported by the visual as specified above.

colormap is the specification of an X11 colomap. It is needed because t1lib might need to allocate some more colors for antialiasing purposes. The same colormap that the application uses should be specified here. If the application uses no special color handling, DefaultColormap(...) is probably the right value.

As mentioned before, the X11 rastering functions put the characters with their origin at the specified point. This behavior, being the default, can be switched by calling

 void T1_LogicalPositionX( int pos_switch)

to 0pt Specifying pos_switch=0 has the effect that in subsequent calls to X11 rastering functions the result will be placed with the upper left corner at the specified position. The default behavior can be restored by calling this function again with some non-zero value.


next up previous contents index
Next: Rastering Functions Up: The X11-Interface Previous: Why a Special X11-Interface?   Contents   Index
2005-01-12