Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

GPR_$SET_PIXEL_FORMAT             GPR Calls              GPR_$SET_PIXEL_FORMAT


NAME
     gpr_$set_pixel_format - changes the pixel format.

FORMAT
     gpr_$set_pixel_format (bitmap, pixel_format, status)

DESCRIPTION
     This routine changes the pixel format.  Use this routine to change the
     pixel format that was specified in the gpr_$init or gpr_$initialize call.
     This routine serves two main purposes:

        ⊕  It allows an application to switch between true color and pseudo
           color without having to reinitialize GPR

        ⊕  It gives Dialogue applications, which do not yet have access to
           gpr_$initialize, a way to access the new pixel formats

   Input Parameters
     bitmap
          The descriptor of the initial GPR bitmap, in gpr_$bitmap_desc_t for-
          mat.  This is the bitmap descriptor returned in the gpr_$initialize
          call.

     pixel_format
          The desired pixel format, in gpr_$pixel_format_t format.

   Output Parameters
     status
          Completion status, in status_$t format.

NOTES
     Before you call this routine, you must deallocate all projections other
     than the projection for the initial bitmap specified in the gpr_$init or
     gpr_$initialize routine.  To deallocate a projection, call
     gpr_$deallocate_bitmap.

     To find the available pixel formats for a device, call
     gpr_$inq_pixel_formats.  The formats returned in gpr_$inq_pixel_formats
     specify the maximum allowable depth of each projection for each of the
     given formats.  In addition, you may specify a format with fewer planes
     for a particular projection than a format returned in
     gpr_$inq_pixel_formats.  For example, you may specify a pseudo color
     pixel format with an image depth of four planes even though eight would
     be available to you.

     The error status gpr_$cant_mix_modes is returned when you specify a dif-
     ferent depth for any active projection other than the initial projection
     returned by gpr_$initialize.  To correct this error, deallocate all the
     projections except the initial projection with gpr_$deallocate_bitmap.

     If you specify a pixel format that the device does not support, you will
     get the status gpr_$wrong_display_hardware.

     This call does not clear the data in any projections.  For example, if an
     application calls gpr_$set_pixel_format to change the image planes from
     pseudo color to true color, all of the bitmap's colors will change
     because GPR will be interpretting the pixel values differently.  To
     correct this, the application should call gpr_$clear immediately before
     and immediately after gpr_$set_pixel_values.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026