Main Page   Modules   Compound List   File List   Compound Members   File Members  

image_display.h File Reference

#include <gandalf/image/image_defs.h>

Go to the source code of this file.

Functions

Gan_Bool gan_image_display (Gan_Image *img)
 Displays an image using OpenGL.

Gan_Bool gan_display_new_window (int height, int width, double zoom, char *name, int offset_r, int offset_c, int *window_id)
 Creates an OpenGL display window.

Gan_Bool gan_display_new_window_array (int rows, int cols, int height, int width, double zoom, char *name, int offset_r, int offset_c, int *window_id, int **subwindow_id)
 Creates an OpenGL display window with subwindows.

Gan_Bool gan_image_display_new_window (Gan_Image *img, double zoom, char *name, int offset_r, int offset_c, int *window_id)
 Displays an image using OpenGL.

void gan_image_display_free_windows (void)
 Frees image display stuff.


Detailed Description

Module: Display images using Open GL

Part of: Gandalf Library

Revision: Last edited: Author:

Copyright: (c) 2000 Imagineer Software Limited


Function Documentation

Gan_Bool gan_display_new_window int    height,
int    width,
double    zoom,
char *    name,
int    offset_r,
int    offset_c,
int *    window_id
 

Creates an OpenGL display window.

Parameters:
height The height images/graphics to be shown in the window
width The width of images/graphics to be shown in the window
zoom Zoom factor for image/graphics in the window
name A name for the window
offset_r Vertical offset of window from corner of screen
offset_c Horizontal offset of window from corner of screen
window_id Pointer to the OpenGL display window ID
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Creates a new OpenGL window, with the given dimensions, zoom factor, name and screen offsets. Upon success, the ID of the new OpenGL window is passed back in the window_id pointer.

See also:
gan_display_new_window_array().

Gan_Bool gan_display_new_window_array int    rows,
int    cols,
int    height,
int    width,
double    zoom,
char *    name,
int    offset_r,
int    offset_c,
int *    window_id,
int **    subwindow_id
 

Creates an OpenGL display window with subwindows.

Parameters:
rows Number of subwindows in window vertically
cols Number of subwindows in window horizontally
height The height images/graphics to be shown in the window
width The width of images/graphics to be shown in the window
zoom Zoom factor for image/graphics in the window
name A name for the window
offset_r Vertical offset of window from corner of screen
offset_c Horizontal offset of window from corner of screen
window_id Pointer to the main OpenGL display window ID
subwindow_id Pointer to the array of OpenGL subwindow IDs
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Creates a new OpenGL window with the given name and screen offsets, and containing subwindows, each with the given dimensions and zoom factor, in an array of rows by cols subwindows. Upon success, the ID of the main OpenGL window created is passed back in the window_id pointer, and an array of rows by cols OpenGL subwindow IDs is passed back in subwindow_id. (*subwindow_id)[0], (*subwindow_id)[cols-1], (*subwindow_id)[rows*(cols-1)] and (*subwindow_id)[rows*cols-1] are the IDs for the top-left, top-right, bottom-left and bottom-right subwindows respectively. The subwindow_id array is dynamically allocated using malloc().

See also:
gan_display_new_window().

Gan_Bool gan_image_display Gan_Image   img
 

Displays an image using OpenGL.

Parameters:
img The image to display
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Displays an image on the screen using the OpenGL function glDrawPixels(). Assumes that the graphics window has already been set up in a way similar to the procedure in gan_image_display_new_window().

See also:
gan_image_display_new_window().

void gan_image_display_free_windows void   
 

Frees image display stuff.

Returns:
No value.
Call this function to free stored display images created by calls to gan_image_display_new_window(), just prior to exiting the program.

See also:
gan_image_display_new_window().

Gan_Bool gan_image_display_new_window Gan_Image   img,
double    zoom,
char *    name,
int    offset_r,
int    offset_c,
int *    window_idp
 

Displays an image using OpenGL.

Parameters:
img The image to display
zoom Zoom factor
name A name for the window
offset_r Vertical offset of window from corner of screen
offset_c Horizontal offset of window from corner of screen
window_idp Pointer to the OpenGL display window ID
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Creates a new OpenGL window, with the given screen offset and zoom factor, and displays the provided image in the window. The image is copied, so this is not memory-efficient. Upon success, the ID of the new OpenGL window is passed back in the window_id pointer.

See also:
gan_image_display().


Generated on Fri Mar 14 19:32:44 2003 by doxygen1.3-rc1