Annotation of parser3/src/classes/gd/gif.h, revision 1.1

1.1     ! paf         1: /** @file
        !             2:        gd.h: declarations file for the gifdraw module.
        !             3: 
        !             4:        Written by Tom Boutell, 5/94.
        !             5:        Copyright 1994, Cold Spring Harbor Labs.
        !             6:        Permission granted to use this code in any fashion provided
        !             7:        that this notice is retained and any alterations are
        !             8:        labeled as such. It is requested, but not required, that
        !             9:        you share extensions to this module with us so that we
        !            10:        can incorporate them into new versions. */
        !            11: 
        !            12: #ifndef GIF_H
        !            13: #define GIF_H 1
        !            14: 
        !            15: #include <stdio.h>
        !            16: #include <string.h>
        !            17: #define gdMaxColors 0x100
        !            18: 
        !            19: /* Image type. See functions below; you will not need to change
        !            20:        the elements directly. Use the provided macros to
        !            21:        access sx, sy, the color table, and colorsTotal for 
        !            22:        read-only purposes. */
        !            23: 
        !            24: typedef struct gdImageStruct {
        !            25:        unsigned char ** pixels;
        !            26:        int sx;
        !            27:        int sy;
        !            28:        int colorsTotal;
        !            29:        int red[gdMaxColors];
        !            30:        int green[gdMaxColors];
        !            31:        int blue[gdMaxColors]; 
        !            32:        int open[gdMaxColors];
        !            33:        int transparent;
        !            34:        int *polyInts;
        !            35:        int polyAllocated;
        !            36:        int styleWidth;
        !            37:        int interlace;
        !            38: } gdImage;
        !            39: 
        !            40: typedef gdImage * gdImagePtr;
        !            41: 
        !            42: /* For backwards compatibility only. Use gdImageSetStyle() for MUCH more flexible line drawing. Also see gdImageSetBrush(). */
        !            43: 
        !            44: #define gdDashSize 4
        !            45: 
        !            46: /* Special colors. */
        !            47: 
        !            48: /* Functions to manipulate images. */
        !            49: 
        !            50: gdImagePtr gdImageCreate(int sx, int sy);
        !            51: gdImagePtr gdImageCreateFromGif(FILE *fd);
        !            52: gdImagePtr gdImageCreateFromGd(FILE *in);
        !            53: gdImagePtr gdImageCreateFromXbm(FILE *fd);
        !            54: void gdImageDestroy(gdImagePtr im);
        !            55: void gdImageSetPixel(gdImagePtr im, int x, int y, int color);
        !            56: int gdImageGetPixel(gdImagePtr im, int x, int y);
        !            57: void gdImageLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
        !            58: void gdImageDashedLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
        !            59: void gdImageRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
        !            60: void gdImageFilledRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
        !            61: 
        !            62: /* Point type for use in polygon drawing. */
        !            63: 
        !            64: typedef struct {
        !            65:        int x, y;
        !            66: } gdPoint, *gdPointPtr;
        !            67: 
        !            68: void gdImagePolygon(gdImagePtr im, gdPointPtr p, int n, int c);
        !            69: void gdImageFilledPolygon(gdImagePtr im, gdPointPtr p, int n, int c);
        !            70: void gdImageFilledPolygonReplaceColor(gdImagePtr im, gdPointPtr p, int n, int a, int b);
        !            71: 
        !            72: int gdImageColorAllocate(gdImagePtr im, int r, int g, int b);
        !            73: int gdImageColorClosest(gdImagePtr im, int r, int g, int b);
        !            74: int gdImageColorExact(gdImagePtr im, int r, int g, int b);
        !            75: int gdImageColorRGB(gdImagePtr im, int r, int g, int b);
        !            76: int gdImageColor(gdImagePtr im, unsigned int rgb);
        !            77: void gdImageColorDeallocate(gdImagePtr im, int color);
        !            78: void gdImageColorTransparent(gdImagePtr im, int color);
        !            79: void gdImageGif(gdImagePtr im, FILE *out);
        !            80: void gdImageGd(gdImagePtr im, FILE *out);
        !            81: void gdImageArc(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color);
        !            82: void gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int color);
        !            83: void gdImageFill(gdImagePtr im, int x, int y, int color);
        !            84: void gdImageCopy(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h);
        !            85: void gdImageCopyResized(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH);
        !            86: void gdImageStyle(gdImagePtr im, int width);
        !            87: void gdImageInterlace(gdImagePtr im, int interlaceArg); /* On or off (1 or 0) */
        !            88: 
        !            89: /* Macros to access information about images. READ ONLY. Changing
        !            90:        these values will NOT have the desired result. */
        !            91: #define gdImageSX(im) ((im)->sx)
        !            92: #define gdImageSY(im) ((im)->sy)
        !            93: #define gdImageColorsTotal(im) ((im)->colorsTotal)
        !            94: #define gdImageRed(im, c) ((im)->red[(c)])
        !            95: #define gdImageGreen(im, c) ((im)->green[(c)])
        !            96: #define gdImageBlue(im, c) ((im)->blue[(c)])
        !            97: #define gdImageGetTransparent(im) ((im)->transparent)
        !            98: #define gdImageGetInterlaced(im) ((im)->interlace)
        !            99: 
        !           100: #endif

E-mail: