Next: Defining the View Up: Opening Graphics Windows Previous: Graphics System Information

Window Configuration

There are several routines for setting and querying various attributes of windows.


public  void  G_set_double_buffer_state(
    Gwindow        window,
    BOOLEAN        flag )
public  BOOLEAN  G_get_double_buffer_state(
    Gwindow        window )

These two functions set and get the state of double buffering for the specified window. A value of TRUE corresponds to double buffering, while a value of FALSE corresponds to single buffering. Double buffering is a technique where each frame of graphical display is first drawn into a buffer which is not visible, then quickly made visible so that there is no flashing while drawing is performed and animations are smooth. There may be a penalty of reduced colour resolution when using double buffered mode.


public  void  G_set_colour_map_state(
    Gwindow        window,
    BOOLEAN        flag )
public  BOOLEAN  G_get_colour_map_state(
    Gwindow        window )

These two functions set and get the state of colour mapping in the given window. A value of TRUE corresponds to colour mapped mode where colours are specified by indices into a list of colours called the colour table. A value of FALSE corresponds to RGB mode, where colours are specified by the three components of red, green, and blue colour.


public  int  G_get_n_colour_map_entries(
    Gwindow        window )

Returns the maximum number of colour map entries for the specified window, a value which may depend on whether the window is in single or double buffer mode.


public  void  G_set_colour_map_entry(
    Gwindow         window,
    int             index,
    Colour          colour )

Sets the colour of the specified colour table index. Any graphic object drawn with this index as its colour will be displayed in the colour specified as the last argument to this function.


public  void  G_set_zbuffer_state(
    Gwindow         window,
    BOOLEAN         flag )
public  BOOLEAn  G_get_zbuffer_state(
    Gwindow         window )

Sets or queries the state of depth buffering in the specified window. Depth buffering is the process of rendering solid objects or surfaces in such a way that any part of an object that is behind another object in the scene is not displayed in the scene. This effectively imitates the natural principle of occlusion and provides more realistic 3D images.


public  void  G_get_window_size(
    Gwindow        window,
    int            *x_size,
    int            *y_size )

Passes back the current size of the specified window, in pixels.


public  void  G_get_window_position(
    Gwindow        window,
    int            *x_pos,
    int            *y_pos )

Passes back the current position of the specified window, in pixels from the bottom left corner of the screen.


public  void  G_set_background_colour(
    Gwindow         window,
    Colour          colour )

Sets the background colour of the specified window, i.e., the colour that will be used for those portions of the display where nothing is drawn. If the window is in colour map mode, then the colour is in the form of an integer index. Otherwise, it is in the form of a 32 bit, red, green, blue, and opacity colour.



Next: Defining the View Up: Opening Graphics Windows Previous: Graphics System Information


david@pet.mni.mcgill.ca
Fri Feb 17 15:39:43 EST 1995