test: app.h Source File

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# app.h

Go to the documentation of this file.

    00001 /*
    00002         File:           LHApplication.h
    00003
    00004         Contains:
    00005
    00006         Written by:     U. J. Krabbenhoeft
    00007
    00008         Copyright:      © 1993-1997 by Heidelberger Druckmaschinen AG, all rights reserved.
    00009
    00010 */
    00011 #ifndef LHApplication_h
    00012 #define LHApplication_h
    00013
    00014 #ifdef __cplusplus
    00015 extern "C" {
    00016 #endif
    00017
    00018 #if PRAGMA_ALIGN_SUPPORTED
    00019 #pragma options align=mac68k
    00020 #endif
    00021
    00022 #if PRAGMA_IMPORT_SUPPORTED
    00023 #pragma import on
    00024 #endif
    00025
    00026 #define MAX_ELEMENT_PER_PIXEL   17 /* 16 Colors + Alpha */
    00027 typedef struct LH_CMBitmapPlane
    00028 {
    00029         char *                                          image[MAX_ELEMENT_PER_PIXEL];   /* used for plane-interleaved data              */
    00030         long                                            width;                                                  /* count of pixel in a line                             */
    00031         long                                            height;                                                 /* line count                                                   */
    00032         long                                            rowBytes;                                               /* Offset to next line                                  */
    00033         long                                            elementOffset;                                  /* Offset to next element in a plane    */
    00034         long                                            pixelSize;                                              /* not used                                                             */
    00035         CMBitmapColorSpace                      space;                                                  /* color space                                                  */
    00036         long                                            user1;                                                  /* not used                                                             */
    00037         long                                            user2;                                                  /* not used                                                             */
    00038 } LH_CMBitmapPlane;
    00039
    00040 /* example:
    00041         convert CMYK plane interleaved (InPtr) to BGR pixel interleaved (OutPtr)
    00042         InBitMap.width = OutBitMap.width = 200;
    00043         InBitMap.height = OutBitMap.height = 100;
    00044         InBitMap.rowBytes = 200;
    00045         InBitMap.elementOffset = 1;
    00046         InBitMap.space = cmCMYK32Space;
    00047         InBitMap.image[0] = InPtr+InBitMap.rowBytes*0;
    00048         InBitMap.image[1] = InPtr+InBitMap.rowBytes*1;
    00049         InBitMap.image[2] = InPtr+InBitMap.rowBytes*2;
    00050         InBitMap.image[3] = InPtr+InBitMap.rowBytes*3;
    00051         OutBitMap.rowBytes = 200 * 3;
    00052         OutBitMap.elementOffset = 3;
    00053         OutBitMap.space = cmRGB24Space;
    00054         OutBitMap.image[0] = OutPtr+2;
    00055         OutBitMap.image[1] = OutPtr+1;
    00056         OutBitMap.image[2] = OutPtr+0;
    00057
    00058         Only 8 bit or 16 bit data allowed.
    00059 */
    00060 #if PRAGMA_IMPORT_SUPPORTED
    00061 #pragma import off
    00062 #endif
    00063
    00064 #if PRAGMA_ALIGN_SUPPORTED
    00065 #pragma options align=reset
    00066 #endif
    00067
    00068 #ifdef __cplusplus
    00069 }
    00070 #endif
    00071 #endif
    00072