< prev index next >

src/java.desktop/share/native/libawt/java2d/SurfaceData.h

Print this page




 146  *
 147  *      union priv {};
 148  * A buffer of private data for the SurfaceData implementation.
 149  * This field is a union of a data block of the desired default
 150  * size (SD_RASINFO_PRIVATE_SIZE) and a (void *) pointer that
 151  * ensures proper "strictest" alignment on all platforms.
 152  */
 153 typedef struct {
 154     SurfaceDataBounds   bounds;                 /* bounds of raster array */
 155     void                *rasBase;               /* Pointer to (0, 0) pixel */
 156     jint                pixelBitOffset;         /* bit offset to (0, *) pixel */
 157     jint                pixelStride;            /* bytes to next X pixel */
 158     jint                scanStride;             /* bytes to next Y pixel */
 159     unsigned int        lutSize;                /* # colors in colormap */
 160     jint                *lutBase;               /* Pointer to colormap[0] */
 161     unsigned char       *invColorTable;         /* Inverse color table */
 162     char                *redErrTable;           /* Red ordered dither table */
 163     char                *grnErrTable;           /* Green ordered dither table */
 164     char                *bluErrTable;           /* Blue ordered dither table */
 165     int                 *invGrayTable;          /* Inverse gray table */

 166     union {
 167         void            *align;                 /* ensures strict alignment */
 168         char            data[SD_RASINFO_PRIVATE_SIZE];
 169     } priv;
 170 } SurfaceDataRasInfo;
 171 
 172 typedef struct _SurfaceDataOps SurfaceDataOps;
 173 
 174 /*
 175  * This function is used to lock a particular region of a particular
 176  * destination.  Once this method is called, no changes of any of the
 177  * data returned by any of the other SurfaceData vectored functions
 178  * may change until a corresponding call to Release is made.
 179  *
 180  * The env parameter should be the JNIEnv of the surrounding JNI context.
 181  *
 182  * The ops parameter should be a pointer to the ops object upon which
 183  * this function is being invoked.
 184  *
 185  * The rasInfo parameter should be a pointer to a SurfaceDataRasInfo




 146  *
 147  *      union priv {};
 148  * A buffer of private data for the SurfaceData implementation.
 149  * This field is a union of a data block of the desired default
 150  * size (SD_RASINFO_PRIVATE_SIZE) and a (void *) pointer that
 151  * ensures proper "strictest" alignment on all platforms.
 152  */
 153 typedef struct {
 154     SurfaceDataBounds   bounds;                 /* bounds of raster array */
 155     void                *rasBase;               /* Pointer to (0, 0) pixel */
 156     jint                pixelBitOffset;         /* bit offset to (0, *) pixel */
 157     jint                pixelStride;            /* bytes to next X pixel */
 158     jint                scanStride;             /* bytes to next Y pixel */
 159     unsigned int        lutSize;                /* # colors in colormap */
 160     jint                *lutBase;               /* Pointer to colormap[0] */
 161     unsigned char       *invColorTable;         /* Inverse color table */
 162     char                *redErrTable;           /* Red ordered dither table */
 163     char                *grnErrTable;           /* Green ordered dither table */
 164     char                *bluErrTable;           /* Blue ordered dither table */
 165     int                 *invGrayTable;          /* Inverse gray table */
 166     int                 representsPrimary;      /* whether cmap represents primary colors */
 167     union {
 168         void            *align;                 /* ensures strict alignment */
 169         char            data[SD_RASINFO_PRIVATE_SIZE];
 170     } priv;
 171 } SurfaceDataRasInfo;
 172 
 173 typedef struct _SurfaceDataOps SurfaceDataOps;
 174 
 175 /*
 176  * This function is used to lock a particular region of a particular
 177  * destination.  Once this method is called, no changes of any of the
 178  * data returned by any of the other SurfaceData vectored functions
 179  * may change until a corresponding call to Release is made.
 180  *
 181  * The env parameter should be the JNIEnv of the surrounding JNI context.
 182  *
 183  * The ops parameter should be a pointer to the ops object upon which
 184  * this function is being invoked.
 185  *
 186  * The rasInfo parameter should be a pointer to a SurfaceDataRasInfo


< prev index next >